예제 #1
0
파일: Transport.cs 프로젝트: ziez/akka.net
 /// <summary>
 /// TBD
 /// </summary>
 /// <returns>TBD</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(((LocalAddress != null ? LocalAddress.GetHashCode() : 0) * 397) ^ (RemoteAddress != null ? RemoteAddress.GetHashCode() : 0));
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (localAddress_ != null)
            {
                hash ^= LocalAddress.GetHashCode();
            }
            if (metadata_ != null)
            {
                hash ^= Metadata.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.LegacyDataMessage)
            {
                hash ^= LegacyDataMessage.GetHashCode();
            }
            if (dataCase_ == DataOneofCase.Content)
            {
                hash ^= Content.GetHashCode();
            }
            hash ^= (int)dataCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #3
0
 /// <summary>
 /// Overrode this to make sure that the <see cref="ReliableDeliverySupervisor"/> can correctly store
 /// <see cref="AckedReceiveBuffer{T}"/> data for each <see cref="Link"/> individually, since the HashCode
 /// is what Dictionary types use internally for equality checking by default.
 /// </summary>
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash = hash * 23 + (LocalAddress == null ? 0 : LocalAddress.GetHashCode());
         hash = hash * 23 + (RemoteAddress == null ? 0 : RemoteAddress.GetHashCode());
         return(hash);
     }
 }
예제 #4
0
 /// <summary>
 ///     Serves as the default hash function.
 /// </summary>
 /// <returns>
 ///     A hash code for the current object.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked {
         if (string.IsNullOrEmpty(SheetName))
         {
             return(LocalAddress.GetHashCode());
         }
         return(SheetName.GetHashCode() ^ LocalAddress.GetHashCode());
     }
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0UL)
            {
                hash ^= Id.GetHashCode();
            }
            if (localAddress_ != null)
            {
                hash ^= LocalAddress.GetHashCode();
            }
            if (remoteAddress_ != null)
            {
                hash ^= RemoteAddress.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
예제 #6
0
 public override int GetHashCode()
 {
     return(LocalAddress.GetHashCode() ^ RemoteAddress.GetHashCode());
 }