示例#1
0
 public bool Equals(TransactionTree obj)
 {
     return(this.Compare(obj, rhs => _hashCode == rhs._hashCode &&
                         TransactionId == rhs.TransactionId &&
                         CommandId == rhs.CommandId &&
                         WorkflowId == rhs.WorkflowId &&
                         EffectiveAt == rhs.EffectiveAt &&
                         Offset == rhs.Offset &&
                         !EventsById.Except(rhs.EventsById).Any() &&
                         !RootEventIds.Except(rhs.RootEventIds).Any()));
 }
示例#2
0
 public bool Equals(TransactionTree other)
 {
     if (ReferenceEquals(other, null))
     {
         return(false);
     }
     if (ReferenceEquals(other, this))
     {
         return(true);
     }
     if (TransactionId != other.TransactionId)
     {
         return(false);
     }
     if (CommandId != other.CommandId)
     {
         return(false);
     }
     if (WorkflowId != other.WorkflowId)
     {
         return(false);
     }
     if (!object.Equals(EffectiveAt, other.EffectiveAt))
     {
         return(false);
     }
     if (Offset != other.Offset)
     {
         return(false);
     }
     if (!EventsById.Equals(other.EventsById))
     {
         return(false);
     }
     if (!rootEventIds_.Equals(other.rootEventIds_))
     {
         return(false);
     }
     if (!object.Equals(TraceContext, other.TraceContext))
     {
         return(false);
     }
     return(Equals(_unknownFields, other._unknownFields));
 }
示例#3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TransactionId.Length != 0)
            {
                hash ^= TransactionId.GetHashCode();
            }
            if (CommandId.Length != 0)
            {
                hash ^= CommandId.GetHashCode();
            }
            if (WorkflowId.Length != 0)
            {
                hash ^= WorkflowId.GetHashCode();
            }
            if (effectiveAt_ != null)
            {
                hash ^= EffectiveAt.GetHashCode();
            }
            if (Offset.Length != 0)
            {
                hash ^= Offset.GetHashCode();
            }
            hash ^= EventsById.GetHashCode();
            hash ^= rootEventIds_.GetHashCode();
            if (traceContext_ != null)
            {
                hash ^= TraceContext.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }