コード例 #1
0
        //Hashing this ways ensures we hash based on channel identity not on channel content
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 31 + channelIndex.GetHashCode();
            hash = hash * 31 + channelType.GetHashCode();
            return(hash);
        }
コード例 #2
0
 /// <summary>
 /// Hash Function for ChannelId
 /// </summary>
 /// <returns>A hash code for the current object</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hc = (_domain?.GetHashCode() ?? 0);
         hc = (hc * 397) ^ (_name?.GetHashCode() ?? 0);
         hc = (hc * 397) ^ (_issuer?.GetHashCode() ?? 0);
         hc = (hc * 397) ^ (_domain?.GetHashCode() ?? 0);
         hc = (hc * 397) ^ _type.GetHashCode();
         return(hc);
     }
 }
コード例 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ChannelType != 0)
            {
                hash ^= ChannelType.GetHashCode();
            }
            if (Content.Length != 0)
            {
                hash ^= Content.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ChannelType != 0)
            {
                hash ^= ChannelType.GetHashCode();
            }
            if (UnitNo != 0)
            {
                hash ^= UnitNo.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
コード例 #5
0
 public override int GetHashCode()
 {
     return(ChannelOrder.GetHashCode() ^ ChannelType.GetHashCode());
 }