Esempio n. 1
0
        /// <summary>
        /// Deep copies the current DbContentCatalog to another instance of DbContentCatalog.
        /// </summary>
        /// <param name="DbContentCatalog">The DbContentCatalog to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the DbContentCatalog from its children.</param>
        public void CopyTo(DbContentCatalog dbContentCatalog, bool isolation)
        {
            dbContentCatalog.iD                               = iD;
            dbContentCatalog.isPlaceHolder                    = isPlaceHolder;
            dbContentCatalog.isSynced                         = isSynced;
            dbContentCatalog.title                            = title;
            dbContentCatalog.description                      = description;
            dbContentCatalog.keywords                         = keywords;
            dbContentCatalog.status                           = status;
            dbContentCatalog.workflowMode                     = workflowMode;
            dbContentCatalog.commentsEnabled                  = commentsEnabled;
            dbContentCatalog.notifyOnComments                 = notifyOnComments;
            dbContentCatalog.enabled                          = enabled;
            dbContentCatalog.sortOrder                        = sortOrder;
            dbContentCatalog.icon                             = icon;
            dbContentCatalog.createDate                       = createDate;
            dbContentCatalog.modifyDate                       = modifyDate;
            dbContentCatalog.defaultTimeToPublish             = defaultTimeToPublish;
            dbContentCatalog.defaultTimeToExpire              = defaultTimeToExpire;
            dbContentCatalog.defaultTimeToArchive             = defaultTimeToArchive;
            dbContentCatalog.defaultKeywords                  = defaultKeywords;
            dbContentCatalog.defaultMenuLeftIcon              = defaultMenuLeftIcon;
            dbContentCatalog.defaultMenuRightIcon             = defaultMenuRightIcon;
            dbContentCatalog.menuLabel                        = menuLabel;
            dbContentCatalog.menuTooltip                      = menuTooltip;
            dbContentCatalog.menuEnabled                      = menuEnabled;
            dbContentCatalog.menuOrder                        = menuOrder;
            dbContentCatalog.menuLeftIcon                     = menuLeftIcon;
            dbContentCatalog.menuRightIcon                    = menuRightIcon;
            dbContentCatalog.menuBreakImage                   = menuBreakImage;
            dbContentCatalog.menuBreakCssClass                = menuBreakCssClass;
            dbContentCatalog.menuCssClass                     = menuCssClass;
            dbContentCatalog.menuCatalogCssClass              = menuCatalogCssClass;
            dbContentCatalog.menuCatalogSelectedCssClass      = menuCatalogSelectedCssClass;
            dbContentCatalog.menuCatalogChildSelectedCssClass = menuCatalogChildSelectedCssClass;
            dbContentCatalog.menuClipCssClass                 = menuClipCssClass;
            dbContentCatalog.menuClipSelectedCssClass         = menuClipSelectedCssClass;
            dbContentCatalog.menuClipChildSelectedCssClass    = menuClipChildSelectedCssClass;
            dbContentCatalog.menuClipChildExpandedCssClass    = menuClipChildExpandedCssClass;
            dbContentCatalog.menuOverrideFlags                = menuOverrideFlags;
            dbContentCatalog.menuIconFlags                    = menuIconFlags;

            if (parentCatalog != null)
            {
                if (isolation)
                {
                    dbContentCatalog.parentCatalog = parentCatalog.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.parentCatalog = parentCatalog.Copy(false);
                }
            }
            if (childCatalogs != null)
            {
                if (isolation)
                {
                    dbContentCatalog.childCatalogs = childCatalogs.Copy(true);
                }
                else
                {
                    dbContentCatalog.childCatalogs = childCatalogs.Copy(false);
                }
            }
            if (defaultClip != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultClip = defaultClip.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultClip = defaultClip.Copy(false);
                }
            }
            if (defaultStatus != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultStatus = defaultStatus.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultStatus = defaultStatus.Copy(false);
                }
            }
            if (defaultRating != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultRating = defaultRating.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultRating = defaultRating.Copy(false);
                }
            }
            if (defaultArchive != null)
            {
                if (isolation)
                {
                    dbContentCatalog.defaultArchive = defaultArchive.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.defaultArchive = defaultArchive.Copy(false);
                }
            }
            if (templates != null)
            {
                if (isolation)
                {
                    dbContentCatalog.templates = templates.Copy(true);
                }
                else
                {
                    dbContentCatalog.templates = templates.Copy(false);
                }
            }
            if (authorRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.authorRole = authorRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.authorRole = authorRole.Copy(false);
                }
            }
            if (editorRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.editorRole = editorRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.editorRole = editorRole.Copy(false);
                }
            }
            if (reviewerRole != null)
            {
                if (isolation)
                {
                    dbContentCatalog.reviewerRole = reviewerRole.NewPlaceHolder();
                }
                else
                {
                    dbContentCatalog.reviewerRole = reviewerRole.Copy(false);
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Deep copies the current DbContentClip to another instance of DbContentClip.
        /// </summary>
        /// <param name="DbContentClip">The DbContentClip to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the DbContentClip from its children.</param>
        public void CopyTo(DbContentClip dbContentClip, bool isolation)
        {
            dbContentClip.iD                = iD;
            dbContentClip.isPlaceHolder     = isPlaceHolder;
            dbContentClip.isSynced          = isSynced;
            dbContentClip.createDate        = createDate;
            dbContentClip.modifyDate        = modifyDate;
            dbContentClip.title             = title;
            dbContentClip.description       = description;
            dbContentClip.keywords          = keywords;
            dbContentClip.icon              = icon;
            dbContentClip.body              = body;
            dbContentClip.publishDate       = publishDate;
            dbContentClip.expirationDate    = expirationDate;
            dbContentClip.archiveDate       = archiveDate;
            dbContentClip.priority          = priority;
            dbContentClip.sortOrder         = sortOrder;
            dbContentClip.commentsEnabled   = commentsEnabled;
            dbContentClip.notifyOnComments  = notifyOnComments;
            dbContentClip.overrideUrl       = overrideUrl;
            dbContentClip.menuLabel         = menuLabel;
            dbContentClip.menuTooltip       = menuTooltip;
            dbContentClip.menuEnabled       = menuEnabled;
            dbContentClip.menuOrder         = menuOrder;
            dbContentClip.menuLeftIcon      = menuLeftIcon;
            dbContentClip.menuLeftIconOver  = menuLeftIconOver;
            dbContentClip.menuRightIcon     = menuRightIcon;
            dbContentClip.menuRightIconOver = menuRightIconOver;
            dbContentClip.menuBreak         = menuBreak;

            if (status != null)
            {
                if (isolation)
                {
                    dbContentClip.status = status.NewPlaceHolder();
                }
                else
                {
                    dbContentClip.status = status.Copy(false);
                }
            }
            if (parentCatalog != null)
            {
                if (isolation)
                {
                    dbContentClip.parentCatalog = parentCatalog.NewPlaceHolder();
                }
                else
                {
                    dbContentClip.parentCatalog = parentCatalog.Copy(false);
                }
            }
            if (rating != null)
            {
                if (isolation)
                {
                    dbContentClip.rating = rating.NewPlaceHolder();
                }
                else
                {
                    dbContentClip.rating = rating.Copy(false);
                }
            }
            if (references != null)
            {
                if (isolation)
                {
                    dbContentClip.references = references.Copy(true);
                }
                else
                {
                    dbContentClip.references = references.Copy(false);
                }
            }
            if (workingDraft != null)
            {
                if (isolation)
                {
                    dbContentClip.workingDraft = workingDraft.NewPlaceHolder();
                }
                else
                {
                    dbContentClip.workingDraft = workingDraft.Copy(false);
                }
            }
            if (authors != null)
            {
                if (isolation)
                {
                    dbContentClip.authors = authors.Copy(true);
                }
                else
                {
                    dbContentClip.authors = authors.Copy(false);
                }
            }
            if (editors != null)
            {
                if (isolation)
                {
                    dbContentClip.editors = editors.Copy(true);
                }
                else
                {
                    dbContentClip.editors = editors.Copy(false);
                }
            }
        }