aboutsummaryrefslogtreecommitdiff
path: root/csharp/ProtocolBuffers/AbstractMessage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/ProtocolBuffers/AbstractMessage.cs')
-rw-r--r--csharp/ProtocolBuffers/AbstractMessage.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/csharp/ProtocolBuffers/AbstractMessage.cs b/csharp/ProtocolBuffers/AbstractMessage.cs
index 9f855a45..6dfcc46d 100644
--- a/csharp/ProtocolBuffers/AbstractMessage.cs
+++ b/csharp/ProtocolBuffers/AbstractMessage.cs
@@ -16,6 +16,7 @@
using System.Collections;
using System.Collections.Generic;
using System.IO;
+using Google.ProtocolBuffers.Collections;
using Google.ProtocolBuffers.Descriptors;
namespace Google.ProtocolBuffers {
@@ -171,15 +172,13 @@ namespace Google.ProtocolBuffers {
if (otherMessage == null || otherMessage.DescriptorForType != DescriptorForType) {
return false;
}
- // TODO(jonskeet): Check that dictionaries support equality appropriately
- // (I suspect they don't!)
- return AllFields.Equals(otherMessage.AllFields);
+ return Dictionaries.Equals(AllFields, otherMessage.AllFields);
}
public override int GetHashCode() {
int hash = 41;
hash = (19 * hash) + DescriptorForType.GetHashCode();
- hash = (53 * hash) + AllFields.GetHashCode();
+ hash = (53 * hash) + Dictionaries.GetHashCode(AllFields);
return hash;
}
}