Пример #1
0
        private void SetVals(SiteData s, List <ContentPageExport> pages)
        {
            this.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;
            this.ExportDate        = DateTime.UtcNow;

            this.NewSiteID = Guid.NewGuid();

            this.TheSite  = s;
            this.ThePages = pages;

            if (this.TheSite == null)
            {
                this.TheSite        = new SiteData();
                this.TheSite.SiteID = Guid.NewGuid();
            }
            if (this.ThePages == null)
            {
                this.ThePages = new List <ContentPageExport>();
            }

            this.OriginalSiteID = TheSite.SiteID;

            foreach (var w in ThePages)
            {
                w.OriginalSiteID = NewSiteID;
            }

            this.TheCategories = s.GetCategoryList();
            this.TheTags       = s.GetTagList();
            this.TheSnippets   = s.GetContentSnippetList();
        }
Пример #2
0
        private void SetVals(SiteData s, List<ContentPageExport> pages)
        {
            this.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;
            this.ExportDate = DateTime.UtcNow;

            this.NewSiteID = Guid.NewGuid();

            this.TheSite = s;
            this.ThePages = pages;

            if (this.TheSite == null) {
                this.TheSite = new SiteData();
                this.TheSite.SiteID = Guid.NewGuid();
            }
            if (this.ThePages == null) {
                this.ThePages = new List<ContentPageExport>();
            }

            this.OriginalSiteID = TheSite.SiteID;

            foreach (var w in ThePages) {
                w.OriginalSiteID = NewSiteID;
            }

            this.TheCategories = s.GetCategoryList();
            this.TheTags = s.GetTagList();
            this.TheSnippets = s.GetContentSnippetList();
        }