public void DeployIntranet(SPSite site, Options options) { // pushing site model if (options.DeploySite) { var siteModel = new M2ProjectPrefixSiteModel(); this.DeploySiteModel(site, siteModel.GetSandboxSolutionsModel()); this.DeploySiteModel(site, siteModel.GetSiteFeaturesModel()); this.DeploySiteModel(site, siteModel.GetSiteSecurityModel()); this.DeploySiteModel(site, siteModel.GetFieldsAndContentTypesModel()); } // pushing root web model if (options.DeployRootWeb) { var rootWebModel = new M2ProjectPrefixRootWebModel(); this.DeployWebModel(site.RootWeb, rootWebModel.GetStyleLibraryModel()); this.DeployWebModel(site.RootWeb, rootWebModel.GetModel()); } // pushing 'How-tow' sub web if (options.DeployHowTosWeb) { var howTosWebModel = new M2ProjectPrefixHowTosWebModel(); this.DeployWebModel(site.RootWeb, howTosWebModel.GetModel()); } }
public void CanProvisionIntranet_SiteModel() { WithCSOMContext(context => { var siteModel = new M2ProjectPrefixSiteModel(); var rootWebModel = new M2ProjectPrefixRootWebModel(); var provisionService = new CSOMProvisionService(); // site provisionService.DeploySiteModel(context, siteModel.GetSiteFeaturesModel()); provisionService.DeploySiteModel(context, siteModel.GetUserCustomActionModel()); provisionService.DeploySiteModel(context, siteModel.GetSiteSecurityModel()); provisionService.DeploySiteModel(context, siteModel.GetFieldsAndContentTypesModel()); provisionService.DeploySiteModel(context, siteModel.GetSandboxSolutionsModel()); // root web provisionService.DeployWebModel(context, rootWebModel.GetStyleLibraryModel()); provisionService.DeployWebModel(context, rootWebModel.GetModel()); }); }