From 7762f163a4150772be9a0eae3a285ff9b1eb3246 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 4 Feb 2016 06:51:54 +0000 Subject: Rename Preconditions to ProtoPreconditions (Generated code changes in next commit.) --- csharp/src/Google.Protobuf/Collections/MapField.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'csharp/src/Google.Protobuf/Collections') diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index 04754ae3..90a5ff1a 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -123,7 +123,7 @@ namespace Google.Protobuf.Collections /// true if the map contains the given key; false otherwise. public bool ContainsKey(TKey key) { - Preconditions.CheckNotNullUnconstrained(key, "key"); + ProtoPreconditions.CheckNotNullUnconstrained(key, "key"); return map.ContainsKey(key); } @@ -140,7 +140,7 @@ namespace Google.Protobuf.Collections /// true if the map contained the given key before the entry was removed; false otherwise. public bool Remove(TKey key) { - Preconditions.CheckNotNullUnconstrained(key, "key"); + ProtoPreconditions.CheckNotNullUnconstrained(key, "key"); LinkedListNode> node; if (map.TryGetValue(key, out node)) { @@ -188,7 +188,7 @@ namespace Google.Protobuf.Collections { get { - Preconditions.CheckNotNullUnconstrained(key, "key"); + ProtoPreconditions.CheckNotNullUnconstrained(key, "key"); TValue value; if (TryGetValue(key, out value)) { @@ -198,11 +198,11 @@ namespace Google.Protobuf.Collections } set { - Preconditions.CheckNotNullUnconstrained(key, "key"); + ProtoPreconditions.CheckNotNullUnconstrained(key, "key"); // value == null check here is redundant, but avoids boxing. if (value == null) { - Preconditions.CheckNotNullUnconstrained(value, "value"); + ProtoPreconditions.CheckNotNullUnconstrained(value, "value"); } LinkedListNode> node; var pair = new KeyValuePair(key, value); @@ -234,7 +234,7 @@ namespace Google.Protobuf.Collections /// The entries to add to the map. public void Add(IDictionary entries) { - Preconditions.CheckNotNull(entries, "entries"); + ProtoPreconditions.CheckNotNull(entries, "entries"); foreach (var pair in entries) { Add(pair.Key, pair.Value); @@ -501,7 +501,7 @@ namespace Google.Protobuf.Collections void IDictionary.Remove(object key) { - Preconditions.CheckNotNull(key, "key"); + ProtoPreconditions.CheckNotNull(key, "key"); if (!(key is TKey)) { return; @@ -530,7 +530,7 @@ namespace Google.Protobuf.Collections { get { - Preconditions.CheckNotNull(key, "key"); + ProtoPreconditions.CheckNotNull(key, "key"); if (!(key is TKey)) { return null; -- cgit v1.2.3