Пример #1
0
 public void MergeFrom(Order other)
 {
     if (other == null)
     {
         return;
     }
     if (other.OrderID != 0)
     {
         OrderID = other.OrderID;
     }
     if (other.CustomerID.Length != 0)
     {
         CustomerID = other.CustomerID;
     }
     if (other.EmployeeID != 0)
     {
         EmployeeID = other.EmployeeID;
     }
     if (other.orderDate_ != null)
     {
         if (orderDate_ == null)
         {
             orderDate_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         OrderDate.MergeFrom(other.OrderDate);
     }
     if (other.requiredDate_ != null)
     {
         if (requiredDate_ == null)
         {
             requiredDate_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         RequiredDate.MergeFrom(other.RequiredDate);
     }
     if (other.shippedDate_ != null)
     {
         if (shippedDate_ == null)
         {
             shippedDate_ = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         ShippedDate.MergeFrom(other.ShippedDate);
     }
     if (other.ShipVia != 0)
     {
         ShipVia = other.ShipVia;
     }
     if (other.Freight != 0D)
     {
         Freight = other.Freight;
     }
     if (other.ShipName.Length != 0)
     {
         ShipName = other.ShipName;
     }
     if (other.ShipAddress.Length != 0)
     {
         ShipAddress = other.ShipAddress;
     }
     if (other.ShipCity.Length != 0)
     {
         ShipCity = other.ShipCity;
     }
     if (other.ShipRegion.Length != 0)
     {
         ShipRegion = other.ShipRegion;
     }
     if (other.ShipPostalCode.Length != 0)
     {
         ShipPostalCode = other.ShipPostalCode;
     }
     if (other.ShipCountry.Length != 0)
     {
         ShipCountry = other.ShipCountry;
     }
     lines_.Add(other.lines_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }