/// <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() { int hash = 1; if (kindCase_ == KindOneofCase.StringValue) { hash ^= StringValue.GetHashCode(); } if (kindCase_ == KindOneofCase.FloatValue) { hash ^= FloatValue.GetHashCode(); } if (kindCase_ == KindOneofCase.DoubleValue) { hash ^= DoubleValue.GetHashCode(); } if (kindCase_ == KindOneofCase.IntValue) { hash ^= IntValue.GetHashCode(); } if (kindCase_ == KindOneofCase.UintValue) { hash ^= UintValue.GetHashCode(); } if (kindCase_ == KindOneofCase.SintValue) { hash ^= SintValue.GetHashCode(); } if (kindCase_ == KindOneofCase.BoolValue) { hash ^= BoolValue.GetHashCode(); } hash ^= (int)kindCase_; return(hash); }
public override int GetHashCode() { int hash = 1; if (HasBoolValue) { hash ^= BoolValue.GetHashCode(); } if (HasIntValue) { hash ^= IntValue.GetHashCode(); } if (HasFloatValue) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(FloatValue); } if (HasStringValue) { hash ^= StringValue.GetHashCode(); } if (HasBlobValue) { hash ^= BlobValue.GetHashCode(); } if (HasUintValue) { hash ^= UintValue.GetHashCode(); } hash ^= (int)typeCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Serves as a hash function for a <see cref="CameraValue"/>. /// </summary> /// <returns>A hash code for the current <see cref="CameraValue"/></returns> public override int GetHashCode() { unchecked { int hash = (int)2166136261; hash *= 16777619 ^ IntValue.GetHashCode(); hash *= 16777619 ^ ValueType.GetHashCode(); return(hash); } }
public override Int32 GetHashCode() { switch (NumberType) { case NumberType.Int: return(IntValue.GetHashCode()); case NumberType.Float: return(FloatValue.GetHashCode()); default: return(0); } }
public override int GetHashCode() { int hash = 1; if (Type != 0) { hash ^= Type.GetHashCode(); } if (valueCase_ == ValueOneofCase.IntValue) { hash ^= IntValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.LongIntValue) { hash ^= LongIntValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.BoolValue) { hash ^= BoolValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.StringValue) { hash ^= StringValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.BytesValue) { hash ^= BytesValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.FloatValue) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue); } if (valueCase_ == ValueOneofCase.DoubleValue) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue); } if (ObjectTypeId != 0) { hash ^= ObjectTypeId.GetHashCode(); } hash ^= (int)valueCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (HasBoolValue) { hash ^= BoolValue.GetHashCode(); } if (HasIntValue) { hash ^= IntValue.GetHashCode(); } if (HasFloatValue) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(FloatValue); } if (HasStringValue) { hash ^= StringValue.GetHashCode(); } if (HasBlobValue) { hash ^= BlobValue.GetHashCode(); } if (HasMessageValue) { hash ^= MessageValue.GetHashCode(); } if (HasFourccValue) { hash ^= FourccValue.GetHashCode(); } if (HasUintValue) { hash ^= UintValue.GetHashCode(); } if (HasEntityIdValue) { hash ^= EntityIdValue.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (BoolValue != false) { hash ^= BoolValue.GetHashCode(); } if (IntValue != 0L) { hash ^= IntValue.GetHashCode(); } if (FloatValue != 0D) { hash ^= FloatValue.GetHashCode(); } if (StringValue.Length != 0) { hash ^= StringValue.GetHashCode(); } if (BlobValue.Length != 0) { hash ^= BlobValue.GetHashCode(); } if (MessageValue.Length != 0) { hash ^= MessageValue.GetHashCode(); } if (FourccValue.Length != 0) { hash ^= FourccValue.GetHashCode(); } if (UintValue != 0UL) { hash ^= UintValue.GetHashCode(); } if (entityIdValue_ != null) { hash ^= EntityIdValue.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (TypeName.Length != 0) { hash ^= TypeName.GetHashCode(); } if (oneofValueCase_ == OneofValueOneofCase.BoolValue) { hash ^= BoolValue.GetHashCode(); } if (oneofValueCase_ == OneofValueOneofCase.IntValue) { hash ^= IntValue.GetHashCode(); } if (oneofValueCase_ == OneofValueOneofCase.DoubleValue) { hash ^= DoubleValue.GetHashCode(); } if (oneofValueCase_ == OneofValueOneofCase.StringValue) { hash ^= StringValue.GetHashCode(); } if (ProtoDesc.Length != 0) { hash ^= ProtoDesc.GetHashCode(); } hash ^= (int)oneofValueCase_; return(hash); }
public override int GetHashCode() { int hash = 1; if (Value.Length != 0) { hash ^= Value.GetHashCode(); } if (ShortValue != 0) { hash ^= ShortValue.GetHashCode(); } if (IntValue != 0) { hash ^= IntValue.GetHashCode(); } if (LongValue != 0L) { hash ^= LongValue.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (StringValue.Length != 0) { hash ^= StringValue.GetHashCode(); } if (FloatValue != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FloatValue); } if (DoubleValue != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue); } if (IntValue != 0L) { hash ^= IntValue.GetHashCode(); } if (UintValue != 0UL) { hash ^= UintValue.GetHashCode(); } if (SintValue != 0L) { hash ^= SintValue.GetHashCode(); } if (BoolValue != false) { hash ^= BoolValue.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (valueCase_ == ValueOneofCase.IntValue) { hash ^= IntValue.GetHashCode(); } if (valueCase_ == ValueOneofCase.DoubleValue) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(DoubleValue); } if (valueCase_ == ValueOneofCase.StringValue) { hash ^= StringValue.GetHashCode(); } hash ^= (int)valueCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Key.Length != 0) { hash ^= Key.GetHashCode(); } if (typedValueCase_ == TypedValueOneofCase.BoolValue) { hash ^= BoolValue.GetHashCode(); } if (typedValueCase_ == TypedValueOneofCase.IntValue) { hash ^= IntValue.GetHashCode(); } hash ^= (int)typedValueCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }