From 3e7d70cb699e93a485ef11fce034f4767aac4b8f Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 25 Jun 2015 12:08:55 +0100 Subject: Generated code changes due to map changes. (Primarily this is starting the hash code of messages at a non-zero value...) --- csharp/src/AddressBook/Addressbook.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'csharp/src/AddressBook') diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs index 2fb6be83..2b430262 100644 --- a/csharp/src/AddressBook/Addressbook.cs +++ b/csharp/src/AddressBook/Addressbook.cs @@ -155,7 +155,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } public override int GetHashCode() { - int hash = 0; + int hash = 17; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Id != 0) hash ^= Id.GetHashCode(); if (Email.Length != 0) hash ^= Email.GetHashCode(); @@ -200,6 +200,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } return size; } + public void MergeFrom(Person other) { if (other == null) { return; @@ -329,7 +330,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } public override int GetHashCode() { - int hash = 0; + int hash = 17; if (Number.Length != 0) hash ^= Number.GetHashCode(); if (Type != global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType.HOME) hash ^= Type.GetHashCode(); return hash; @@ -356,6 +357,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } return size; } + public void MergeFrom(PhoneNumber other) { if (other == null) { return; @@ -456,7 +458,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } public override int GetHashCode() { - int hash = 0; + int hash = 17; hash ^= person_.GetHashCode(); return hash; } @@ -477,6 +479,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook { } return size; } + public void MergeFrom(AddressBook other) { if (other == null) { return; -- cgit v1.2.3