public override int GetHashCode()
        {
            var hashCode = -1095595053;

            hashCode = hashCode * -1521134295 + Importance.GetHashCode();
            foreach (var filter in Filters)
            {
                hashCode = hashCode * -1521134295 + filter.GetHashCode();
            }

            return(hashCode);
        }
Esempio n. 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ Version.GetHashCode();
         hashCode = (hashCode * 397) ^ TaskId.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Action;
         hashCode = (hashCode * 397) ^ (NewParentId != null ? NewParentId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Annoyance.GetHashCode();
         hashCode = (hashCode * 397) ^ Importance.GetHashCode();
         hashCode = (hashCode * 397) ^ Urgency.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 3
0
 /// <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 (Id != null)
         {
             hashCode = hashCode * 59 + Id.GetHashCode();
         }
         if (Title != null)
         {
             hashCode = hashCode * 59 + Title.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Importance != null)
         {
             hashCode = hashCode * 59 + Importance.GetHashCode();
         }
         if (CreatedDate != null)
         {
             hashCode = hashCode * 59 + CreatedDate.GetHashCode();
         }
         if (DueDate != null)
         {
             hashCode = hashCode * 59 + DueDate.GetHashCode();
         }
         if (FinishedDate != null)
         {
             hashCode = hashCode * 59 + FinishedDate.GetHashCode();
         }
         if (Finished != null)
         {
             hashCode = hashCode * 59 + Finished.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (OperationId.Length != 0)
            {
                hash ^= OperationId.GetHashCode();
            }
            if (OperationName.Length != 0)
            {
                hash ^= OperationName.GetHashCode();
            }
            if (ConsumerId.Length != 0)
            {
                hash ^= ConsumerId.GetHashCode();
            }
            if (startTime_ != null)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (endTime_ != null)
            {
                hash ^= EndTime.GetHashCode();
            }
            hash ^= Labels.GetHashCode();
            hash ^= metricValueSets_.GetHashCode();
            hash ^= logEntries_.GetHashCode();
            if (Importance != global::Google.Cloud.ServiceControl.V1.Operation.Types.Importance.Low)
            {
                hash ^= Importance.GetHashCode();
            }
            hash ^= extensions_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }