Beispiel #1
0
            public void Handle(HasGuid message)
            {
                if (Data.NestedData == null)
                {
                    Data.NestedData = new NestedData();
                }

                Data.NestedData.CorrelationId = message.Guid;
                Data.NestedData.Counter++;
            }
Beispiel #2
0
        public override int GetHashCode()
        {
            int hashCode = 0;

            if (this.HasGuid)
            {
                return(Guid.GetHashCode());
            }
            if (this.HasName)
            {
                return(Name.GetHashCode());
            }
            unchecked {
                hashCode += 1000000007 * HasGuid.GetHashCode();
                hashCode += 1000000009 * Guid.GetHashCode();
                hashCode += 1000000021 * HasName.GetHashCode();
                if (Name != null)
                {
                    hashCode += 1000000033 * Name.GetHashCode();
                }
            }
            return(hashCode);
        }
Beispiel #3
0
 protected bool Equals(HasGuid other)
 {
     return(Guid.Equals(other.Guid));
 }