Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (StringVal != null ? StringVal.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IntVal;
         hashCode = (hashCode * 397) ^ BooleanVal.GetHashCode();
         hashCode = (hashCode * 397) ^ ByteVal.GetHashCode();
         hashCode = (hashCode * 397) ^ LongVal.GetHashCode();
         hashCode = (hashCode * 397) ^ FloatVal.GetHashCode();
         hashCode = (hashCode * 397) ^ DoubleVal.GetHashCode();
         hashCode = (hashCode * 397) ^ DateTimeVal.GetHashCode();
         hashCode = (hashCode * 397) ^ ShortVal.GetHashCode();
         hashCode = (hashCode * 397) ^ UShortVal.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)UIntVal;
         hashCode = (hashCode * 397) ^ ULongVal.GetHashCode();
         hashCode = (hashCode * 397) ^ SByteVal.GetHashCode();
         hashCode = (hashCode * 397) ^ CharVal.GetHashCode();
         return(hashCode);
     }
 }
Example #2
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.boolVal)
                {
                    hashcode = (hashcode * 397) + BoolVal.GetHashCode();
                }
                if (__isset.byteVal)
                {
                    hashcode = (hashcode * 397) + ByteVal.GetHashCode();
                }
                if (__isset.i16Val)
                {
                    hashcode = (hashcode * 397) + I16Val.GetHashCode();
                }
                if (__isset.i32Val)
                {
                    hashcode = (hashcode * 397) + I32Val.GetHashCode();
                }
                if (__isset.i64Val)
                {
                    hashcode = (hashcode * 397) + I64Val.GetHashCode();
                }
                if (__isset.doubleVal)
                {
                    hashcode = (hashcode * 397) + DoubleVal.GetHashCode();
                }
                if (__isset.stringVal)
                {
                    hashcode = (hashcode * 397) + StringVal.GetHashCode();
                }
                if (__isset.binaryVal)
                {
                    hashcode = (hashcode * 397) + BinaryVal.GetHashCode();
                }
            }
            return(hashcode);
        }