jeudi 22 janvier 2015

Getting sharepoint feature Properties programatically using CSOM in Sharepoint Online



i am working on "getting properties of Sharepoint Feature using CSOM in Sharepoint Online".


following is the code which i wrote :



try
{
Password password = new Password();
SecureString securePassword = new SecureString();
securePassword = password.ConvertStringToSecureString();
using (ClientContext context = new ClientContext("https://mysite"))
{

Web web = context.Web;

FeatureCollection featuresCollection = web.Features;

context.Load(featuresCollection);

context.ExecuteQuery();
foreach (Feature feature in featuresCollection)
{

Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("Feature Definition ID:{0}", feature.DefinitionId);

}
}
}


there is only one property (feature.DefinitionId) which i found for the feature object.is there any way to get the other properties of feature?


PS-(can we do anything with featureDefinitionID and get the Feature Definition XML in Sharepoint Online?)








0 commentaires:

Enregistrer un commentaire