Get all the user custom actions using client object model


using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.Client;
namespace
ClientObjectModel
{
class Program
{
static void Main(string[] args)
{

//Get all the user custom actions using client object model

string siteURL = "http://serverName:1111/sites/SPSiteDataQuery/";
ClientContext context = new ClientContext(siteURL);
List list = context.Web.Lists.GetByTitle("Shared documents");
UserCustomActionCollection collUserCustomAction = list.UserCustomActions;
context.Load(collUserCustomAction);
context.ExecuteQuery();
foreach (UserCustomAction userCustomAction in collUserCustomAction)
{
Console.WriteLine(userCustomAction.Title.ToString());
}
Console.ReadLine();
}
}
}