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.Conformance/Conformance.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.Conformance/Conformance.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Conformance/Conformance.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf.Conformance/Conformance.cs b/csharp/src/Google.Protobuf.Conformance/Conformance.cs index dfd331ae..9626bea3 100644 --- a/csharp/src/Google.Protobuf.Conformance/Conformance.cs +++ b/csharp/src/Google.Protobuf.Conformance/Conformance.cs @@ -269,6 +269,7 @@ namespace Conformance { if (ProtobufPayload != other.ProtobufPayload) return false; if (JsonPayload != other.JsonPayload) return false; if (RequestedOutputFormat != other.RequestedOutputFormat) return false; + if (PayloadCase != other.PayloadCase) return false; return true; } @@ -277,6 +278,7 @@ namespace Conformance { if (payloadCase_ == PayloadOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); if (payloadCase_ == PayloadOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); if (RequestedOutputFormat != global::Conformance.WireFormat.UNSPECIFIED) hash ^= RequestedOutputFormat.GetHashCode(); + hash ^= (int) payloadCase_; return hash; } @@ -512,6 +514,7 @@ namespace Conformance { if (ProtobufPayload != other.ProtobufPayload) return false; if (JsonPayload != other.JsonPayload) return false; if (Skipped != other.Skipped) return false; + if (ResultCase != other.ResultCase) return false; return true; } @@ -522,6 +525,7 @@ namespace Conformance { if (resultCase_ == ResultOneofCase.ProtobufPayload) hash ^= ProtobufPayload.GetHashCode(); if (resultCase_ == ResultOneofCase.JsonPayload) hash ^= JsonPayload.GetHashCode(); if (resultCase_ == ResultOneofCase.Skipped) hash ^= Skipped.GetHashCode(); + hash ^= (int) resultCase_; return hash; } @@ -1461,6 +1465,7 @@ namespace Conformance { 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; } @@ -1532,6 +1537,7 @@ namespace Conformance { 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; } |