aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Collections/MapField.cs
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2015-07-30 13:35:55 +0100
committerJon Skeet <skeet@pobox.com>2015-07-30 13:35:55 +0100
commit7909b2edeb19affdf3f96a0b13a8098f28860c3c (patch)
tree7b2d1c5a0d8c8176d52b9d810eebfcf88dadcd08 /csharp/src/Google.Protobuf/Collections/MapField.cs
parent7a0effb9e956ee5509d99a33f7d8fb52a9636871 (diff)
parentdea15a7ca474dde957f7c4826e517fbaa0c983d3 (diff)
downloadprotobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.tar.gz
protobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.tar.bz2
protobuf-7909b2edeb19affdf3f96a0b13a8098f28860c3c.zip
Merge pull request #659 from jskeet/fix-frozen
Remove a few hangers-on from frozenness.
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/MapField.cs')
-rw-r--r--csharp/src/Google.Protobuf/Collections/MapField.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs
index 0f7227c2..9f460e1e 100644
--- a/csharp/src/Google.Protobuf/Collections/MapField.cs
+++ b/csharp/src/Google.Protobuf/Collections/MapField.cs
@@ -54,7 +54,6 @@ namespace Google.Protobuf.Collections
{
// TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.)
private readonly bool allowNullValues;
- private bool frozen;
private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> map =
new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
private readonly LinkedList<KeyValuePair<TKey, TValue>> list = new LinkedList<KeyValuePair<TKey, TValue>>();
@@ -254,7 +253,7 @@ namespace Google.Protobuf.Collections
public bool AllowsNullValues { get { return allowNullValues; } }
public int Count { get { return list.Count; } }
- public bool IsReadOnly { get { return frozen; } }
+ public bool IsReadOnly { get { return false; } }
public override bool Equals(object other)
{
@@ -416,10 +415,6 @@ namespace Google.Protobuf.Collections
set
{
- if (frozen)
- {
- throw new NotSupportedException("Dictionary is frozen");
- }
this[(TKey)key] = (TValue)value;
}
}