summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
diff options
context:
space:
mode:
authorAlex Perovich <alperovi@microsoft.com>2017-03-21 14:55:39 -0500
committerGitHub <noreply@github.com>2017-03-21 14:55:39 -0500
commit12ef04c22b07f1e4ec5a63009298e4537a2c8e1a (patch)
treec70018c97d8437060d94803bb76eaf0c8090a695 /src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
parente21d073e5e2b1d258cfef9111656d46884b242e7 (diff)
downloadcoreclr-12ef04c22b07f1e4ec5a63009298e4537a2c8e1a.tar.gz
coreclr-12ef04c22b07f1e4ec5a63009298e4537a2c8e1a.tar.bz2
coreclr-12ef04c22b07f1e4ec5a63009298e4537a2c8e1a.zip
Switch coreclr corelib to use resx (#10268)
* Switch to resx * Use roslyn rewriter to switch from GetResourceString to SR * More GetResourceString changes * Add missing resource * Remove Environment.GetResourceString and replace final usages with SR * Remove comment * Fix spacing * Replace final instances of Environment.GetResourceString * Add another missing resource * Add back Environment.GetResourceStringLocal because the runtime needs it
Diffstat (limited to 'src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs')
-rw-r--r--src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs b/src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
index a0ce919ce5..c36f57cf75 100644
--- a/src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
+++ b/src/mscorlib/src/System/Collections/EmptyReadOnlyDictionaryInternal.cs
@@ -43,13 +43,13 @@ namespace System.Collections
throw new ArgumentNullException(nameof(array));
if (array.Rank != 1)
- throw new ArgumentException(Environment.GetResourceString("Arg_RankMultiDimNotSupported"));
+ throw new ArgumentException(SR.Arg_RankMultiDimNotSupported);
if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index), Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum"));
+ throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
if (array.Length - index < this.Count)
- throw new ArgumentException(Environment.GetResourceString("ArgumentOutOfRange_Index"), nameof(index));
+ throw new ArgumentException(SR.ArgumentOutOfRange_Index, nameof(index));
Contract.EndContractBlock();
// the actual copy is a NOP
@@ -87,7 +87,7 @@ namespace System.Collections
{
if (key == null)
{
- throw new ArgumentNullException(nameof(key), Environment.GetResourceString("ArgumentNull_Key"));
+ throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
}
Contract.EndContractBlock();
return null;
@@ -96,17 +96,17 @@ namespace System.Collections
{
if (key == null)
{
- throw new ArgumentNullException(nameof(key), Environment.GetResourceString("ArgumentNull_Key"));
+ throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
}
if (!key.GetType().IsSerializable)
- throw new ArgumentException(Environment.GetResourceString("Argument_NotSerializable"), nameof(key));
+ throw new ArgumentException(SR.Argument_NotSerializable, nameof(key));
if ((value != null) && (!value.GetType().IsSerializable))
- throw new ArgumentException(Environment.GetResourceString("Argument_NotSerializable"), nameof(value));
+ throw new ArgumentException(SR.Argument_NotSerializable, nameof(value));
Contract.EndContractBlock();
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ReadOnly"));
+ throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
}
}
@@ -135,22 +135,22 @@ namespace System.Collections
{
if (key == null)
{
- throw new ArgumentNullException(nameof(key), Environment.GetResourceString("ArgumentNull_Key"));
+ throw new ArgumentNullException(nameof(key), SR.ArgumentNull_Key);
}
if (!key.GetType().IsSerializable)
- throw new ArgumentException(Environment.GetResourceString("Argument_NotSerializable"), nameof(key));
+ throw new ArgumentException(SR.Argument_NotSerializable, nameof(key));
if ((value != null) && (!value.GetType().IsSerializable))
- throw new ArgumentException(Environment.GetResourceString("Argument_NotSerializable"), nameof(value));
+ throw new ArgumentException(SR.Argument_NotSerializable, nameof(value));
Contract.EndContractBlock();
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ReadOnly"));
+ throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
}
public void Clear()
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ReadOnly"));
+ throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
}
public bool IsReadOnly
@@ -176,7 +176,7 @@ namespace System.Collections
public void Remove(Object key)
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ReadOnly"));
+ throw new InvalidOperationException(SR.InvalidOperation_ReadOnly);
}
private sealed class NodeEnumerator : IDictionaryEnumerator
@@ -196,7 +196,7 @@ namespace System.Collections
{
get
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_EnumOpCantHappen"));
+ throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
}
}
@@ -210,7 +210,7 @@ namespace System.Collections
{
get
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_EnumOpCantHappen"));
+ throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
}
}
@@ -218,7 +218,7 @@ namespace System.Collections
{
get
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_EnumOpCantHappen"));
+ throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
}
}
@@ -226,7 +226,7 @@ namespace System.Collections
{
get
{
- throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_EnumOpCantHappen"));
+ throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
}
}
}