Пример #1
0
        public MultiPageAssemblyInstruction()
        {
            // Initialize sub objects.
            _snippets      = new SnippetInfoCollection();
            _pages         = new MultiPageCollection();
            PageMetadata   = new PageMetadata();
            SocialMetadata = new SocialMetadata();
            PageResources  = new PageResources();
            _localFields   = new LocalFieldCollection();

            //base.Initialize();
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            SinglePageAssemblyInstruction target = obj as SinglePageAssemblyInstruction;

            if (target == null)
            {
                return(false);
            }

            if (
                (PageMetadata != null && target.PageMetadata == null) ||
                (PageMetadata == null && target.PageMetadata != null)
                )
            {
                return(false);
            }

            if (PageMetadata != null && target.PageMetadata != null)
            {
                if (!PageMetadata.Equals(target.PageMetadata))
                {
                    return(false);
                }
            }


            if (
                (_snippets != null && target._snippets == null) ||
                (_snippets == null && target._snippets != null)
                )
            {
                return(false);
            }

            if (_snippets != null && target._snippets != null)
            {
                if (!_snippets.Equals(target._snippets))
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #3
0
 public MultiPage()
 {
     // Initialize sub objects.
     _snippets    = new SnippetInfoCollection();
     PageMetadata = new PageMetadata();
 }
Пример #4
0
        /// <summary>
        /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
        /// <returns>
        /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
        /// </returns>
        /// <exception cref="T:System.NullReferenceException">
        /// The <paramref name="obj"/> parameter is null.
        /// </exception>
        public override bool Equals(object obj)
        {
            GenericFileInstruction target = obj as GenericFileInstruction;

            if (target == null)
            {
                return(false);
            }

            if (PrettyUrl != target.PrettyUrl)
            {
                return(false);
            }

            if (FilePath != target.FilePath)
            {
                return(false);
            }

            if (Language != target.Language)
            {
                return(false);
            }

            if (SectionPath != target.SectionPath)
            {
                return(false);
            }

            if (
                (PageMetadata != null && target.PageMetadata == null) ||
                (PageMetadata == null && target.PageMetadata != null)
                )
            {
                return(false);
            }

            if (PageMetadata != null && target.PageMetadata != null)
            {
                if (!PageMetadata.Equals(target.PageMetadata))
                {
                    return(false);
                }
            }

            if (
                (ContentDates != null && target.ContentDates == null) ||
                (ContentDates == null && target.ContentDates != null)
                )
            {
                return(false);
            }

            if (ContentDates != null && target.ContentDates != null)
            {
                if (!ContentDates.Equals(target.ContentDates))
                {
                    return(false);
                }
            }


            return(true);
        }