예제 #1
0
 public bool Equals(CircuitBreakerStateDescriptor other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(State == other.State && TimeToLive.Equals(other.TimeToLive) && TimeStamp.Equals(other.TimeStamp));
 }
예제 #2
0
        public override bool Equals(object obj)
        {
            var record = obj as BaseResourceRecord;

            return(record != null &&
                   EqualityComparer <Domain> .Default.Equals(Name, record.Name) &&
                   Type == record.Type &&
                   Class == record.Class &&
                   TimeToLive.Equals(record.TimeToLive) &&
                   DataLength == record.DataLength &&
                   EqualityComparer <byte[]> .Default.Equals(Data, record.Data) &&
                   Size == record.Size);
        }