コード例 #1
0
        public void Provision(ClientContext ctx, Web web, string siteDefinitionJsonFileAbsolutePath)
        {
            var json    = File.ReadAllText(siteDefinitionJsonFileAbsolutePath);
            var siteDef = SiteDefinition.GetSiteDefinitionFromJson(json);

            Provision(ctx, web, siteDef);
        }
コード例 #2
0
        public void Deprovision(ClientContext ctx, Web web, string siteDefinitionJsonFileAbsolutePath)
        {
            try
            {
                var json = File.ReadAllText(siteDefinitionJsonFileAbsolutePath);

                //TODO: Deal with fallout from Version problem
                var siteDef = SiteDefinition.GetSiteDefinitionFromJson(json);

                Deprovision(ctx, web, siteDef);
            }
            catch (Exception ex)
            {
                var newEx = new Exception("Error during deprovisioning", ex);
                throw newEx;
            }
        }