From e3f6e2b870863aa267e910be3833413ae75f34ce Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Tue, 21 Jun 2016 07:22:48 +0100 Subject: Remove ordering guarantees in the MapField documentation This doesn't currently change the ordering in the implementation, but allows us to do so in the future. We also need to change https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#singular which states "Finally, unlike Dictionary, MapField preserves insertion order of entries." (We can just remove that sentence, I think.) --- csharp/src/Google.Protobuf/Collections/MapField.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index 993a89d7..053f7558 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -48,9 +48,6 @@ namespace Google.Protobuf.Collections /// Value type in the map. Must be a type supported by Protocol Buffers. /// /// - /// This implementation preserves insertion order for simplicity of testing - /// code using maps fields. Overwriting an existing entry does not change the - /// position of that entry within the map. Equality is not order-sensitive. /// For string keys, the equality comparison is provided by . /// /// @@ -65,6 +62,10 @@ namespace Google.Protobuf.Collections /// supported by Protocol Buffers (e.g. using a key type of byte) but nor does it guarantee /// that all operations will work in such cases. /// + /// + /// The order in which entries are returned when iterating over this object is undefined, and may change + /// in future versions. + /// /// public sealed class MapField : IDeepCloneable>, IDictionary, IEquatable>, IDictionary { -- cgit v1.2.3