private void CreateTestSite() { // need to reset the pinned site list var action = new PortalContext.ReloadSiteListDistributedAction(); action.Execute(); var sites = new GenericContent(Repository.Root, "Sites") { Name = "Sites" }; sites.Save(); var site = new Site(sites) { Name = "Fake Test Site", UrlList = new Dictionary <string, string> { { "localhost_forms", "Forms" }, { "localhost_windows", "Windows" }, { "localhost_none", "None" } } }; site.Save(); }
public override void ForceDelete() { base.ForceDelete(); var action = new PortalContext.ReloadSiteListDistributedAction(); action.Execute(); }
private static TestStructure CreateTestStructure() { InstallCarContentType(); // need to reset the pinned site list var action = new PortalContext.ReloadSiteListDistributedAction(); action.Execute(); var sites = new Folder(Repository.Root, "Sites") { Name = "Sites" }; sites.Save(); var site = new Site(sites) { Name = "Site1", UrlList = new Dictionary <string, string> { { "localhost", "None" } } }; site.Save(); var workspace = new Workspace(site) { Name = "Workspace1" }; workspace.Save(); var folder = new Folder(workspace) { Name = "Folder1" }; folder.Save(); return(new TestStructure { Site1 = site, Workspace1 = workspace, Folder1 = folder }); }
public override void Save(SavingMode mode) { RefreshUrlList(); if (this.CopyInProgress) { //we need to reset these values to avoid //conflict with the source site this.UrlList = new Dictionary <string, string>(); this.StartPage = null; } else { ValidateUrlList(); } base.Save(mode); var action = new PortalContext.ReloadSiteListDistributedAction(); action.Execute(); }