Ejemplo n.º 1
0
 public static void ExecuteModel(this SiteModelNode Model, string url, ICredentials Credential = null)
 {
     SharePoint.Session(url, Credential, ctx =>
     {
         var provisionService = new CSOMProvisionService();
         provisionService.DeployModel(SiteModelHost.FromClientContext(ctx), Model);
     });
 }
Ejemplo n.º 2
0
 public static void Execute(SPDeployOptions options)
 {
     SharePoint.Session(options.url, options.Credentials, ctx =>
     {
         var Mask = new FieldMask(ctx);
         Mask.Execute();
     });
 }
Ejemplo n.º 3
0
 public static void Deploy(SPDeployOptions options)
 {
     SharePoint.Session(options.url, options.Credentials, ctx =>
     {
         var provisionService = new CSOMProvisionService();
         provisionService.DeployModel(SiteModelHost.FromClientContext(ctx), DeployModel());
     });
 }
Ejemplo n.º 4
0
 public static void Retract(SPDeployOptions options)
 {
     SharePoint.Session(options.url, options.Credentials, Ctx =>
     {
         var Site          = Ctx.Site;
         var CustomActions = Site.UserCustomActions;
         Ctx.Load(CustomActions);
         Ctx.ExecuteQuery();
         var SettingsLinkAction = CustomActions.Where(x => x.Name == SettingLink().Name).FirstOrDefault();
         if (SettingsLinkAction != null)
         {
             SettingsLinkAction.DeleteObject();
             Ctx.ExecuteQuery();
         }
     });
 }