Example #1
0
        /// <summary>
        ///     Returns true if ReplaceOffer instances are equal
        /// </summary>
        /// <param name="other">Instance of ReplaceOffer to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ReplaceOffer other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     OfferType == other.OfferType ||
                     OfferType != null &&
                     OfferType.Equals(other.OfferType)
                     ) &&
                 (
                     Resource == other.Resource ||
                     Resource != null &&
                     Resource.Equals(other.Resource)
                 ) &&
                 (
                     OfferResourceId == other.OfferResourceId ||
                     OfferResourceId != null &&
                     OfferResourceId.Equals(other.OfferResourceId)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ));
        }
Example #2
0
        /// <summary>
        ///     Returns true if Offer instances are equal
        /// </summary>
        /// <param name="other">Instance of Offer to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Offer other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
            {
                return(false);
            }

            return
                ((
                     OfferType == other.OfferType ||
                     OfferType != null &&
                     OfferType.Equals(other.OfferType)
                     ) &&
                 (
                     Resource == other.Resource ||
                     Resource != null &&
                     Resource.Equals(other.Resource)
                 ) &&
                 (
                     OfferResourceId == other.OfferResourceId ||
                     OfferResourceId != null &&
                     OfferResourceId.Equals(other.OfferResourceId)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Rid == other.Rid ||
                     Rid != null &&
                     Rid.Equals(other.Rid)
                 ) &&
                 (
                     Ts == other.Ts ||
                     Ts != null &&
                     Ts.Equals(other.Ts)
                 ) &&
                 (
                     Self == other.Self ||
                     Self != null &&
                     Self.Equals(other.Self)
                 ) &&
                 (
                     Etag == other.Etag ||
                     Etag != null &&
                     Etag.Equals(other.Etag)
                 ));
        }