Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = PersistOnEventSequenceNr.GetHashCode();
         hashCode = (hashCode * 397) ^ PersistOnEventId.GetHashCode();
         hashCode = (hashCode * 397) ^ InstanceId;
         foreach (var invocation in Invocations)
         {
             hashCode = (hashCode * 397) ^ invocation.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        public bool Equals(PersistOnEventRequest other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (PersistOnEventSequenceNr != other.PersistOnEventSequenceNr)
            {
                return(false);
            }
            if (!PersistOnEventId.Equals(other.PersistOnEventId))
            {
                return(false);
            }
            if (InstanceId != other.InstanceId)
            {
                return(false);
            }
            if (Invocations.Length != other.Invocations.Length)
            {
                return(false);
            }

            for (int i = 0; i < Invocations.Length; i++)
            {
                if (!Equals(this.Invocations[i], other.Invocations[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Payload != null ? Payload.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (EmitterId != null ? EmitterId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (EmitterAggregateId != null ? EmitterAggregateId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ SystemTimestamp.GetHashCode();
         hashCode = (hashCode * 397) ^ (VectorTimestamp != null ? VectorTimestamp.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProcessId != null ? ProcessId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LocalLogId != null ? LocalLogId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ LocalSequenceNr.GetHashCode();
         hashCode = (hashCode * 397) ^ (DeliveryId != null ? DeliveryId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ PersistOnEventSequenceNr.GetHashCode();
         hashCode = (hashCode * 397) ^ PersistOnEventId.GetHashCode();
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         foreach (var id in CustomDestinationAggregateIds)
         {
             hashCode = (hashCode * 397) ^ id.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 4
0
 public bool Equals(DurableEvent other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(Payload, other.Payload) &&
            LocalSequenceNr == other.LocalSequenceNr &&
            string.Equals(EmitterId, other.EmitterId) &&
            string.Equals(EmitterAggregateId, other.EmitterAggregateId) &&
            CustomDestinationAggregateIds.SetEquals(other.CustomDestinationAggregateIds) &&
            SystemTimestamp.Equals(other.SystemTimestamp) &&
            Equals(VectorTimestamp, other.VectorTimestamp) &&
            string.Equals(ProcessId, other.ProcessId) &&
            string.Equals(LocalLogId, other.LocalLogId) &&
            string.Equals(DeliveryId, other.DeliveryId) &&
            PersistOnEventSequenceNr == other.PersistOnEventSequenceNr &&
            PersistOnEventId.Equals(other.PersistOnEventId) &&
            Id.Equals(other.Id));
 }