コード例 #1
0
ファイル: Quota.cs プロジェクト: smoqmilus/gax-dotnet
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (DefaultLimit != 0L)
            {
                hash ^= DefaultLimit.GetHashCode();
            }
            if (MaxLimit != 0L)
            {
                hash ^= MaxLimit.GetHashCode();
            }
            if (FreeTier != 0L)
            {
                hash ^= FreeTier.GetHashCode();
            }
            if (Duration.Length != 0)
            {
                hash ^= Duration.GetHashCode();
            }
            if (Metric.Length != 0)
            {
                hash ^= Metric.GetHashCode();
            }
            if (Unit.Length != 0)
            {
                hash ^= Unit.GetHashCode();
            }
            hash ^= Values.GetHashCode();
            if (DisplayName.Length != 0)
            {
                hash ^= DisplayName.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (DefaultLimit != null)
         {
             hashCode = hashCode * 59 + DefaultLimit.GetHashCode();
         }
         if (UseAbsoluteUri != null)
         {
             hashCode = hashCode * 59 + UseAbsoluteUri.GetHashCode();
         }
         return(hashCode);
     }
 }