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

                if (
                    o.IsNew == IsNew &&
                    o.IsDeleted == IsDeleted &&
                    o.PageNameID == PageNameID &&
                    o.PageID == PageID &&
                    GetComparisonString(o.Source) == GetComparisonString(Source) &&
                    GetComparisonString(o.NameFound) == GetComparisonString(NameFound) &&
                    GetComparisonString(o.NameConfirmed) == GetComparisonString(NameConfirmed) &&
                    o.NameBankID == NameBankID &&
                    o.Active == Active &&
                    o.CreateDate == CreateDate &&
                    o.LastUpdateDate == LastUpdateDate &&
                    o.IsCommonName == IsCommonName
                    )
                {
                    o = null;
                    return(0);                    // true
                }
                else
                {
                    o = null;
                    return(-1);                    // false
                }
            }
            else
            {
                throw new ArgumentException("Argument is not of type __PageName");
            }
        }
Example #2
0
        /// <summary>
        /// Deserializes the byte array and returns an instance of <see cref="__PageName"/>.
        /// </summary>
        /// <returns>If the byte array can be deserialized and cast to an instance of <see cref="__PageName"/>,
        /// returns an instance of <see cref="__PageName"/>; otherwise returns null.</returns>
        public static new __PageName FromArray(byte[] byteArray)
        {
            __PageName o = null;

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

            return(o);
        }