Esempio n. 1
0
        /// <summary>
        ///     Get TLV element hash code.
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                int res = 1;
                foreach (ITlvTag tag in _childTags)
                {
                    res = 31 * res + tag.GetHashCode();
                }

                return(res + Type.GetHashCode() + Forward.GetHashCode() + NonCritical.GetHashCode());
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Get TLV element hash code.
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                int res = 1;
                foreach (byte value in _value)
                {
                    res = 31 * res + value;
                }

                return(res + Type.GetHashCode() + Forward.GetHashCode() + NonCritical.GetHashCode());
            }
        }
Esempio n. 3
0
 /// <summary>
 ///     Get TLV element hash code.
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         return(Value.GetHashCode() + Type.GetHashCode() + Forward.GetHashCode() + NonCritical.GetHashCode());
     }
 }