aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/Collections/MapField.cs
diff options
context:
space:
mode:
authorJon Skeet <jonskeet@google.com>2016-02-04 06:51:54 +0000
committerJon Skeet <jonskeet@google.com>2016-02-04 14:50:43 +0000
commit7762f163a4150772be9a0eae3a285ff9b1eb3246 (patch)
treed5221ec9c489e6fc5c49460387273c3723862981 /csharp/src/Google.Protobuf/Collections/MapField.cs
parentc78222a366edf128e4361d32958dc96d0b4d89d8 (diff)
downloadprotobuf-7762f163a4150772be9a0eae3a285ff9b1eb3246.tar.gz
protobuf-7762f163a4150772be9a0eae3a285ff9b1eb3246.tar.bz2
protobuf-7762f163a4150772be9a0eae3a285ff9b1eb3246.zip
Rename Preconditions to ProtoPreconditions
(Generated code changes in next commit.)
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/MapField.cs')
-rw-r--r--csharp/src/Google.Protobuf/Collections/MapField.cs16
1 files changed, 8 insertions, 8 deletions
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
/// <returns><c>true</c> if the map contains the given key; <c>false</c> otherwise.</returns>
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
/// <returns><c>true</c> if the map contained the given key before the entry was removed; <c>false</c> otherwise.</returns>
public bool Remove(TKey key)
{
- Preconditions.CheckNotNullUnconstrained(key, "key");
+ ProtoPreconditions.CheckNotNullUnconstrained(key, "key");
LinkedListNode<KeyValuePair<TKey, TValue>> 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<KeyValuePair<TKey, TValue>> node;
var pair = new KeyValuePair<TKey, TValue>(key, value);
@@ -234,7 +234,7 @@ namespace Google.Protobuf.Collections
/// <param name="entries">The entries to add to the map.</param>
public void Add(IDictionary<TKey, TValue> 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;