예제 #1
0
 public void MergeFrom(OrderRequest other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CreatedOn != 0UL)
     {
         CreatedOn = other.CreatedOn;
     }
     if (other.UserID.Length != 0)
     {
         UserID = other.UserID;
     }
     if (other.TaxRate != 0)
     {
         TaxRate = other.TaxRate;
     }
     if (other.shippingInfo_ != null)
     {
         if (shippingInfo_ == null)
         {
             shippingInfo_ = new global::PartialFoods.Services.ShippingInfo();
         }
         ShippingInfo.MergeFrom(other.ShippingInfo);
     }
     lineItems_.Add(other.lineItems_);
 }
예제 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (OrderID.Length != 0)
            {
                hash ^= OrderID.GetHashCode();
            }
            if (CreatedOn != 0UL)
            {
                hash ^= CreatedOn.GetHashCode();
            }
            if (UserID.Length != 0)
            {
                hash ^= UserID.GetHashCode();
            }
            if (TaxRate != 0)
            {
                hash ^= TaxRate.GetHashCode();
            }
            if (shippingInfo_ != null)
            {
                hash ^= ShippingInfo.GetHashCode();
            }
            hash ^= lineItems_.GetHashCode();
            return(hash);
        }