From 55313c9c5d7917d58428d84d193ae3772e4684f8 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Sat, 24 Oct 2015 06:46:02 +0100 Subject: Generated code for previous commit (oneof case contributing to hash code and equality). --- csharp/src/Google.Protobuf.Conformance/Conformance.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'csharp/src/Google.Protobuf.Conformance') 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; } -- cgit v1.2.3