Пример #1
0
 public void MergeFrom(Listener other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.address_ != null)
     {
         if (address_ == null)
         {
             address_ = new global::Envoy.Api.V2.Core.Address();
         }
         Address.MergeFrom(other.Address);
     }
     filterChains_.Add(other.filterChains_);
     if (other.useOriginalDst_ != null)
     {
         if (useOriginalDst_ == null || other.UseOriginalDst != false)
         {
             UseOriginalDst = other.UseOriginalDst;
         }
     }
     if (other.perConnectionBufferLimitBytes_ != null)
     {
         if (perConnectionBufferLimitBytes_ == null || other.PerConnectionBufferLimitBytes != 0)
         {
             PerConnectionBufferLimitBytes = other.PerConnectionBufferLimitBytes;
         }
     }
     if (other.metadata_ != null)
     {
         if (metadata_ == null)
         {
             metadata_ = new global::Envoy.Api.V2.Core.Metadata();
         }
         Metadata.MergeFrom(other.Metadata);
     }
     if (other.deprecatedV1_ != null)
     {
         if (deprecatedV1_ == null)
         {
             deprecatedV1_ = new global::Envoy.Api.V2.Listener.Types.DeprecatedV1();
         }
         DeprecatedV1.MergeFrom(other.DeprecatedV1);
     }
     if (other.DrainType != 0)
     {
         DrainType = other.DrainType;
     }
     listenerFilters_.Add(other.listenerFilters_);
     if (other.transparent_ != null)
     {
         if (transparent_ == null || other.Transparent != false)
         {
             Transparent = other.Transparent;
         }
     }
     if (other.freebind_ != null)
     {
         if (freebind_ == null || other.Freebind != false)
         {
             Freebind = other.Freebind;
         }
     }
     if (other.tcpFastOpenQueueLength_ != null)
     {
         if (tcpFastOpenQueueLength_ == null || other.TcpFastOpenQueueLength != 0)
         {
             TcpFastOpenQueueLength = other.TcpFastOpenQueueLength;
         }
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }