Beispiel #1
0
        private static void CreateFields(ClientContext context)
        {
            Deploy deploy = new Deploy();

            string XMLFile = GetFolderRoot() + @"\Fields\FieldDefinition.xml";
            XElement doc = XElement.Load(XMLFile);
            IEnumerable<XElement> fields =
                from e1 in doc.Elements()
                select e1;
            foreach (XElement e in fields)
            {
                string result = deploy.CreateFields(context, e.ToString());
                if (result != "Success")
                    Log(result);
            }
        }
Beispiel #2
0
 private static void CreateSiteStructure(ClientContext context)
 {
     //Iterate through an XML file of the site structure and create as follows...
     Deploy deploy = new Deploy();
     deploy.CreateSite(context, "MytestSite", "MyNamedTestSite", "Some random description");
 }
Beispiel #3
0
        private static void UploadMasterPage(ClientContext context)
        {
            string root = GetDIFolderRoot() + @"\MasterPage";
            string[] files = Directory.GetFiles(root);
            FileInfo fi = new FileInfo(files[0]);

            string destFolder = GetConfigSetting("RootCustomMasterPageFolderUrl") + @"/MasterPage";

            //shd only be one file
            Deploy deploy = new Deploy();
            deploy.UploadMasterPage(context, destFolder, fi.Name, files[0]);
        }