aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2016-06-21 07:22:48 +0100
committerJon Skeet <jonskeet@google.com>2016-06-21 07:22:48 +0100
commite3f6e2b870863aa267e910be3833413ae75f34ce (patch)
treedadbd4c88dbcd9347d61b9c9cb5efa1cc79e330a
parent1a5333b8c176df60a30d8dce77bb35abdabff905 (diff)
downloadprotobuf-e3f6e2b870863aa267e910be3833413ae75f34ce.tar.gz
protobuf-e3f6e2b870863aa267e910be3833413ae75f34ce.tar.bz2
protobuf-e3f6e2b870863aa267e910be3833413ae75f34ce.zip
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<TKey, TValue>, MapField<TKey, TValue> preserves insertion order of entries." (We can just remove that sentence, I think.)
-rw-r--r--csharp/src/Google.Protobuf/Collections/MapField.cs7
1 files 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
/// <typeparam name="TValue">Value type in the map. Must be a type supported by Protocol Buffers.</typeparam>
/// <remarks>
/// <para>
- /// 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 <see cref="StringComparer.Ordinal" />.
/// </para>
/// <para>
@@ -65,6 +62,10 @@ namespace Google.Protobuf.Collections
/// supported by Protocol Buffers (e.g. using a key type of <code>byte</code>) but nor does it guarantee
/// that all operations will work in such cases.
/// </para>
+ /// <para>
+ /// The order in which entries are returned when iterating over this object is undefined, and may change
+ /// in future versions.
+ /// </para>
/// </remarks>
public sealed class MapField<TKey, TValue> : IDeepCloneable<MapField<TKey, TValue>>, IDictionary<TKey, TValue>, IEquatable<MapField<TKey, TValue>>, IDictionary
{