Example #1
0
        private static void RemoveMasterPages(ClientContext clientContext, XElement branding)
        {
            var name   = "";
            var folder = "";

            foreach (var masterpage in branding.Element("masterpages").Descendants("masterpage"))
            {
                name   = masterpage.Attribute("name").Value;
                folder = masterpage.Attribute("folder").Value.TrimEnd(new char[] { '/' });

                BrandingHelper.RemoveMasterPage(clientContext, name, folder);
            }
            BrandingHelper.RemoveFolder(clientContext, folder, "_catalogs/masterpage");
        }
Example #2
0
        private static void RemoveFiles(ClientContext clientContext, XElement branding)
        {
            var name   = "";
            var folder = "";
            var path   = "";

            foreach (var file in branding.Element("files").Descendants("file"))
            {
                name   = file.Attribute("name").Value;
                folder = file.Attribute("folder").Value.TrimEnd(trimChars);
                path   = file.Attribute("path").Value.TrimEnd(trimChars);

                BrandingHelper.RemoveFile(clientContext, name, folder, path);
            }
            BrandingHelper.RemoveFolder(clientContext, folder, path);
        }