Ejemplo n.º 1
0
        /// <summary>
        /// Compares this instance with a specified object. Throws an ArgumentException if the specified object is not of type <see cref="__PageTitleSummaryView"/>.
        /// </summary>
        /// <param name="obj">An <see cref="__PageTitleSummaryView"/> object to compare with this instance.</param>
        /// <returns>0 if the specified object equals this instance; -1 if the specified object does not equal this instance.</returns>
        public virtual int CompareTo(Object obj)
        {
            if (obj is __PageTitleSummaryView)
            {
                __PageTitleSummaryView o = (__PageTitleSummaryView)obj;

                if (
                    o.IsNew == IsNew &&
                    o.IsDeleted == IsDeleted &&
                    GetComparisonString(o.MARCBibID) == GetComparisonString(MARCBibID) &&
                    o.TitleID == TitleID &&
                    GetComparisonString(o.FullTitle) == GetComparisonString(FullTitle) &&
                    o.RareBooks == RareBooks &&
                    GetComparisonString(o.ShortTitle) == GetComparisonString(ShortTitle) &&
                    GetComparisonString(o.SortTitle) == GetComparisonString(SortTitle) &&
                    GetComparisonString(o.PartNumber) == GetComparisonString(PartNumber) &&
                    GetComparisonString(o.PartName) == GetComparisonString(PartName) &&
                    o.ItemStatusID == ItemStatusID &&
                    o.ItemID == ItemID &&
                    GetComparisonString(o.BarCode) == GetComparisonString(BarCode) &&
                    o.PDFSize == PDFSize &&
                    GetComparisonString(o.Volume) == GetComparisonString(Volume) &&
                    GetComparisonString(o.FileRootFolder) == GetComparisonString(FileRootFolder) &&
                    o.ItemSequence == ItemSequence &&
                    o.PageID == PageID &&
                    GetComparisonString(o.FileNamePrefix) == GetComparisonString(FileNamePrefix) &&
                    GetComparisonString(o.PageDescription) == GetComparisonString(PageDescription) &&
                    o.SequenceOrder == SequenceOrder &&
                    o.Illustration == Illustration &&
                    o.Active == Active &&
                    GetComparisonString(o.ExternalURL) == GetComparisonString(ExternalURL) &&
                    GetComparisonString(o.AltExternalURL) == GetComparisonString(AltExternalURL) &&
                    GetComparisonString(o.WebVirtualDirectory) == GetComparisonString(WebVirtualDirectory) &&
                    GetComparisonString(o.OCRFolderShare) == GetComparisonString(OCRFolderShare) &&
                    GetComparisonString(o.DownloadUrl) == GetComparisonString(DownloadUrl) &&
                    GetComparisonString(o.ImageServerUrlFormat) == GetComparisonString(ImageServerUrlFormat)
                    )
                {
                    o = null;
                    return(0);                    // true
                }
                else
                {
                    o = null;
                    return(-1);                    // false
                }
            }
            else
            {
                throw new ArgumentException("Argument is not of type __PageTitleSummaryView");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deserializes the byte array and returns an instance of <see cref="__PageTitleSummaryView"/>.
        /// </summary>
        /// <returns>If the byte array can be deserialized and cast to an instance of <see cref="__PageTitleSummaryView"/>,
        /// returns an instance of <see cref="__PageTitleSummaryView"/>; otherwise returns null.</returns>
        public static new __PageTitleSummaryView FromArray(byte[] byteArray)
        {
            __PageTitleSummaryView o = null;

            try
            {
                o = (__PageTitleSummaryView)CustomObjectBase.FromArray(byteArray);
            }
            catch (Exception e)
            {
                throw e;
            }

            return(o);
        }