Exemplo n.º 1
0
 public void MergeFrom(RouteConfiguration other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     virtualHosts_.Add(other.virtualHosts_);
     if (other.vhds_ != null)
     {
         if (vhds_ == null)
         {
             Vhds = new global::Envoy.Api.V2.Vhds();
         }
         Vhds.MergeFrom(other.Vhds);
     }
     internalOnlyHeaders_.Add(other.internalOnlyHeaders_);
     responseHeadersToAdd_.Add(other.responseHeadersToAdd_);
     responseHeadersToRemove_.Add(other.responseHeadersToRemove_);
     requestHeadersToAdd_.Add(other.requestHeadersToAdd_);
     requestHeadersToRemove_.Add(other.requestHeadersToRemove_);
     if (other.validateClusters_ != null)
     {
         if (validateClusters_ == null || other.ValidateClusters != false)
         {
             ValidateClusters = other.ValidateClusters;
         }
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            hash ^= virtualHosts_.GetHashCode();
            if (vhds_ != null)
            {
                hash ^= Vhds.GetHashCode();
            }
            hash ^= internalOnlyHeaders_.GetHashCode();
            hash ^= responseHeadersToAdd_.GetHashCode();
            hash ^= responseHeadersToRemove_.GetHashCode();
            hash ^= requestHeadersToAdd_.GetHashCode();
            hash ^= requestHeadersToRemove_.GetHashCode();
            if (validateClusters_ != null)
            {
                hash ^= ValidateClusters.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }