/// <summary> /// Overriden. Returns a hash code for the current Object. /// </summary> /// <returns>A hash code for the current Object.</returns> public override int GetHashCode() { switch (ValueType) { case ValueTypeDefinitionData.Reference: return(ReferenceValue.GetHashCode()); case ValueTypeDefinitionData.DateTime: return(DateTimeValue.GetHashCode()); case ValueTypeDefinitionData.Bool: return(BoolValue.GetHashCode()); case ValueTypeDefinitionData.Float: return(FloatValue.GetHashCode()); case ValueTypeDefinitionData.Int: return(IntValue.GetHashCode()); case ValueTypeDefinitionData.StringNonUnicode: return(StringNonUnicodeValue.GetHashCode()); default: return(base.GetHashCode()); } }
public override int GetHashCode() { var hashCode = -894682935; hashCode = hashCode * -1521134295 + EqualityComparer <DateTime?> .Default.GetHashCode(NullableDateTimeValue); hashCode = hashCode * -1521134295 + DateTimeValue.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset?> .Default.GetHashCode(NullableDateTimeOffsetValue); hashCode = hashCode * -1521134295 + EqualityComparer <DateTimeOffset> .Default.GetHashCode(DateTimeOffsetValue); hashCode = hashCode * -1521134295 + LongValue.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <long?> .Default.GetHashCode(NullableLongValue); return(hashCode); }
public override int GetHashCode() { unchecked { var result = GuidValue.GetHashCode(); result = (result * 397) ^ (StringValue != null ? StringValue.GetHashCode() : 0); result = (result * 397) ^ IntValue; result = (result * 397) ^ LongValue.GetHashCode(); result = (result * 397) ^ BoolValue.GetHashCode(); result = (result * 397) ^ ByteValue.GetHashCode(); result = (result * 397) ^ DecimalValue.GetHashCode(); result = (result * 397) ^ DoubleValue.GetHashCode(); result = (result * 397) ^ DateTimeValue.GetHashCode(); result = (result * 397) ^ MaybeMoney.GetHashCode(); return(result); } }
public override int GetHashCode() { unchecked { var hashCode = CharValue.GetHashCode(); hashCode = (hashCode * 397) ^ ByteValue.GetHashCode(); hashCode = (hashCode * 397) ^ SByteValue.GetHashCode(); hashCode = (hashCode * 397) ^ ShortValue.GetHashCode(); hashCode = (hashCode * 397) ^ UShortValue.GetHashCode(); hashCode = (hashCode * 397) ^ IntValue; hashCode = (hashCode * 397) ^ (int)UIntValue; hashCode = (hashCode * 397) ^ LongValue.GetHashCode(); hashCode = (hashCode * 397) ^ ULongValue.GetHashCode(); hashCode = (hashCode * 397) ^ FloatValue.GetHashCode(); hashCode = (hashCode * 397) ^ DoubleValue.GetHashCode(); hashCode = (hashCode * 397) ^ DecimalValue.GetHashCode(); hashCode = (hashCode * 397) ^ DateTimeValue.GetHashCode(); hashCode = (hashCode * 397) ^ GuidValue.GetHashCode(); hashCode = (hashCode * 397) ^ StringValue.GetHashCode(); return(hashCode); } }