Example #1
0
        /// <summary></summary>
        public override int GetHashCode()
        {
            var code = 13;

            code = (code * 7) + Id.GetHashCode();
            if (Attribute != null)
            {
                code = (code * 7) + Attribute.GetHashCode();
            }
            code = (code * 7) + NumericValue.GetHashCode();
            if (StringValueEnumerationKey != null)
            {
                code = (code * 7) + StringValueEnumerationKey.GetHashCode();
            }
            code = (code * 7) + BooleanValue.GetHashCode();
            if (PriorityEnumerationKey != null)
            {
                code = (code * 7) + PriorityEnumerationKey.GetHashCode();
            }
            if (ReliabilityEnumerationKey != null)
            {
                code = (code * 7) + ReliabilityEnumerationKey.GetHashCode();
            }
            var arrCode = 13;

            if (ArrayValue != null)
            {
                foreach (var item in ArrayValue)
                {
                    arrCode = (arrCode * 7) + item.GetHashCode();
                }
            }
            return(code + arrCode);
        }
Example #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hash = 17;
         hash += 23 * StorageType.GetHashCode();
         hash += 23 * DataType.GetHashCode();
         if (IsNumeric)
         {
             hash += 23 * NumericValue.GetHashCode();
         }
         else
         {
             hash += 23 * StringValue.GetHashCode();
         }
         return(hash);
     }
 }
 public override int GetHashCode()
 {
     return(NumericValue.GetHashCode());
 }
Example #4
0
 protected override int GetHashCodeCore()
 {
     return(NumericValue.GetHashCode());
 }