Exemple #1
0
        /// <summary>
        /// Compares this instance with a specified object. Throws an ArgumentException if the specified object is not of type <see cref="__Title"/>.
        /// </summary>
        /// <param name="obj">An <see cref="__Title"/> 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 __Title)
            {
                __Title o = (__Title)obj;

                if (
                    o.IsNew == IsNew &&
                    o.IsDeleted == IsDeleted &&
                    o.TitleID == TitleID &&
                    GetComparisonString(o.MARCBibID) == GetComparisonString(MARCBibID) &&
                    GetComparisonString(o.MARCLeader) == GetComparisonString(MARCLeader) &&
                    o.TropicosTitleID == TropicosTitleID &&
                    o.RedirectTitleID == RedirectTitleID &&
                    GetComparisonString(o.FullTitle) == GetComparisonString(FullTitle) &&
                    GetComparisonString(o.ShortTitle) == GetComparisonString(ShortTitle) &&
                    GetComparisonString(o.UniformTitle) == GetComparisonString(UniformTitle) &&
                    GetComparisonString(o.SortTitle) == GetComparisonString(SortTitle) &&
                    GetComparisonString(o.PartNumber) == GetComparisonString(PartNumber) &&
                    GetComparisonString(o.PartName) == GetComparisonString(PartName) &&
                    GetComparisonString(o.CallNumber) == GetComparisonString(CallNumber) &&
                    GetComparisonString(o.PublicationDetails) == GetComparisonString(PublicationDetails) &&
                    o.StartYear == StartYear &&
                    o.EndYear == EndYear &&
                    GetComparisonString(o.Datafield_260_a) == GetComparisonString(Datafield_260_a) &&
                    GetComparisonString(o.Datafield_260_b) == GetComparisonString(Datafield_260_b) &&
                    GetComparisonString(o.Datafield_260_c) == GetComparisonString(Datafield_260_c) &&
                    GetComparisonString(o.InstitutionCode) == GetComparisonString(InstitutionCode) &&
                    GetComparisonString(o.LanguageCode) == GetComparisonString(LanguageCode) &&
                    GetComparisonString(o.TitleDescription) == GetComparisonString(TitleDescription) &&
                    GetComparisonString(o.TL2Author) == GetComparisonString(TL2Author) &&
                    o.PublishReady == PublishReady &&
                    o.RareBooks == RareBooks &&
                    GetComparisonString(o.Note) == GetComparisonString(Note) &&
                    o.CreationDate == CreationDate &&
                    o.LastModifiedDate == LastModifiedDate &&
                    o.CreationUserID == CreationUserID &&
                    o.LastModifiedUserID == LastModifiedUserID &&
                    GetComparisonString(o.OriginalCatalogingSource) == GetComparisonString(OriginalCatalogingSource) &&
                    GetComparisonString(o.EditionStatement) == GetComparisonString(EditionStatement) &&
                    GetComparisonString(o.CurrentPublicationFrequency) == GetComparisonString(CurrentPublicationFrequency)
                    )
                {
                    o = null;
                    return(0);                    // true
                }
                else
                {
                    o = null;
                    return(-1);                    // false
                }
            }
            else
            {
                throw new ArgumentException("Argument is not of type __Title");
            }
        }
Exemple #2
0
        /// <summary>
        /// Deserializes the byte array and returns an instance of <see cref="__Title"/>.
        /// </summary>
        /// <returns>If the byte array can be deserialized and cast to an instance of <see cref="__Title"/>,
        /// returns an instance of <see cref="__Title"/>; otherwise returns null.</returns>
        public static new __Title FromArray(byte[] byteArray)
        {
            __Title o = null;

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

            return(o);
        }