Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (address_ != null)
            {
                hash ^= Address.GetHashCode();
            }
            hash ^= filterChains_.GetHashCode();
            if (useOriginalDst_ != null)
            {
                hash ^= UseOriginalDst.GetHashCode();
            }
            if (perConnectionBufferLimitBytes_ != null)
            {
                hash ^= PerConnectionBufferLimitBytes.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (deprecatedV1_ != null)
            {
                hash ^= DeprecatedV1.GetHashCode();
            }
            if (DrainType != 0)
            {
                hash ^= DrainType.GetHashCode();
            }
            hash ^= listenerFilters_.GetHashCode();
            if (transparent_ != null)
            {
                hash ^= Transparent.GetHashCode();
            }
            if (freebind_ != null)
            {
                hash ^= Freebind.GetHashCode();
            }
            if (tcpFastOpenQueueLength_ != null)
            {
                hash ^= TcpFastOpenQueueLength.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #2
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);
 }