diff options
author | Jon Skeet <jonskeet@google.com> | 2015-10-24 06:46:02 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-10-24 06:46:02 +0100 |
commit | 55313c9c5d7917d58428d84d193ae3772e4684f8 (patch) | |
tree | c3b6e5ed61941b8d165b562d4e4487521c554a8d /csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs | |
parent | 964627ece023577f252b888c9a9d6d9c2c563fc3 (diff) | |
download | protobuf-55313c9c5d7917d58428d84d193ae3772e4684f8.tar.gz protobuf-55313c9c5d7917d58428d84d193ae3772e4684f8.tar.bz2 protobuf-55313c9c5d7917d58428d84d193ae3772e4684f8.zip |
Generated code for previous commit (oneof case contributing to hash code and equality).
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs index 0c7b5279..cecc2d11 100644 --- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs +++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestProto3.cs @@ -868,6 +868,7 @@ namespace Google.Protobuf.TestProtos { if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false; if (OneofString != other.OneofString) return false; if (OneofBytes != other.OneofBytes) return false; + if (OneofFieldCase != other.OneofFieldCase) return false; return true; } @@ -921,6 +922,7 @@ namespace Google.Protobuf.TestProtos { if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode(); if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode(); if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode(); + hash ^= (int) oneofFieldCase_; return hash; } @@ -4470,6 +4472,7 @@ namespace Google.Protobuf.TestProtos { if (FooInt != other.FooInt) return false; if (FooString != other.FooString) return false; if (!object.Equals(FooMessage, other.FooMessage)) return false; + if (FooCase != other.FooCase) return false; return true; } @@ -4478,6 +4481,7 @@ namespace Google.Protobuf.TestProtos { if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode(); if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode(); if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode(); + hash ^= (int) fooCase_; return hash; } |