Пример #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Code != 0)
            {
                hash ^= Code.GetHashCode();
            }
            if (Time != 0L)
            {
                hash ^= Time.GetHashCode();
            }
            if (ToId.Length != 0)
            {
                hash ^= ToId.GetHashCode();
            }
            if (FromId.Length != 0)
            {
                hash ^= FromId.GetHashCode();
            }
            if (ReqId.Length != 0)
            {
                hash ^= ReqId.GetHashCode();
            }
            if (Data.Length != 0)
            {
                hash ^= Data.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
        public override int GetHashCode()
        {
            int hashToId = ToId.GetHashCode();

            int hashNotificationId = NotificationId.GetHashCode();

            return(hashToId ^ hashNotificationId);
        }
Пример #3
0
        /// <summary>
        ///     Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        ///     A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode( )
        {
            unchecked
            {
                int hash = 17;

                hash = hash * 92821 + TypeId.GetHashCode( );

                hash = hash * 92821 + FromId.GetHashCode( );

                hash = hash * 92821 + ToId.GetHashCode( );

                if (Cardinality != null)
                {
                    hash = hash * 92821 + Cardinality.GetHashCode( );
                }

                return(hash);
            }
        }