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="__ItemCOinSView"/>.
        /// </summary>
        /// <param name="obj">An <see cref="__ItemCOinSView"/> 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 __ItemCOinSView)
            {
                __ItemCOinSView o = (__ItemCOinSView)obj;

                if (
                    o.IsNew == IsNew &&
                    o.IsDeleted == IsDeleted &&
                    o.TitleID == TitleID &&
                    o.ItemID == ItemID &&
                    GetComparisonString(o.Lccn) == GetComparisonString(Lccn) &&
                    GetComparisonString(o.Oclc) == GetComparisonString(Oclc) &&
                    GetComparisonString(o.Rft_title) == GetComparisonString(Rft_title) &&
                    GetComparisonString(o.Rft_stitle) == GetComparisonString(Rft_stitle) &&
                    GetComparisonString(o.Rft_volume) == GetComparisonString(Rft_volume) &&
                    GetComparisonString(o.Rft_language) == GetComparisonString(Rft_language) &&
                    GetComparisonString(o.Rft_isbn) == GetComparisonString(Rft_isbn) &&
                    GetComparisonString(o.Rft_aulast) == GetComparisonString(Rft_aulast) &&
                    GetComparisonString(o.Rft_aufirst) == GetComparisonString(Rft_aufirst) &&
                    GetComparisonString(o.Rft_au_BOOK) == GetComparisonString(Rft_au_BOOK) &&
                    GetComparisonString(o.Rft_au_DC) == GetComparisonString(Rft_au_DC) &&
                    GetComparisonString(o.Rft_aucorp) == GetComparisonString(Rft_aucorp) &&
                    GetComparisonString(o.Rft_place) == GetComparisonString(Rft_place) &&
                    GetComparisonString(o.Rft_pub) == GetComparisonString(Rft_pub) &&
                    GetComparisonString(o.Rft_publisher) == GetComparisonString(Rft_publisher) &&
                    GetComparisonString(o.Rft_date_ITEM) == GetComparisonString(Rft_date_ITEM) &&
                    GetComparisonString(o.Rft_date_TITLE) == GetComparisonString(Rft_date_TITLE) &&
                    GetComparisonString(o.Rft_edition) == GetComparisonString(Rft_edition) &&
                    o.Rft_tpages == Rft_tpages &&
                    GetComparisonString(o.Rft_issn) == GetComparisonString(Rft_issn) &&
                    GetComparisonString(o.Rft_coden) == GetComparisonString(Rft_coden) &&
                    GetComparisonString(o.Rft_subject) == GetComparisonString(Rft_subject) &&
                    GetComparisonString(o.Rft_contributor_ITEM) == GetComparisonString(Rft_contributor_ITEM) &&
                    GetComparisonString(o.Rft_contributor_TITLE) == GetComparisonString(Rft_contributor_TITLE) &&
                    GetComparisonString(o.Rft_genre) == GetComparisonString(Rft_genre)
                    )
                {
                    o = null;
                    return(0);                    // true
                }
                else
                {
                    o = null;
                    return(-1);                    // false
                }
            }
            else
            {
                throw new ArgumentException("Argument is not of type __ItemCOinSView");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deserializes the byte array and returns an instance of <see cref="__ItemCOinSView"/>.
        /// </summary>
        /// <returns>If the byte array can be deserialized and cast to an instance of <see cref="__ItemCOinSView"/>,
        /// returns an instance of <see cref="__ItemCOinSView"/>; otherwise returns null.</returns>
        public static new __ItemCOinSView FromArray(byte[] byteArray)
        {
            __ItemCOinSView o = null;

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

            return(o);
        }