Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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");
 }
Ejemplo n.º 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]);
        }