summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/EncoderReplacementFallback.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Text/EncoderReplacementFallback.cs
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Text/EncoderReplacementFallback.cs')
-rw-r--r--src/mscorlib/src/System/Text/EncoderReplacementFallback.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mscorlib/src/System/Text/EncoderReplacementFallback.cs b/src/mscorlib/src/System/Text/EncoderReplacementFallback.cs
index 15dfee8..604cddf 100644
--- a/src/mscorlib/src/System/Text/EncoderReplacementFallback.cs
+++ b/src/mscorlib/src/System/Text/EncoderReplacementFallback.cs
@@ -6,6 +6,7 @@ namespace System.Text
{
using System;
using System.Runtime;
+ using System.Diagnostics;
using System.Diagnostics.Contracts;
[Serializable]
@@ -23,7 +24,7 @@ namespace System.Text
{
// Must not be null
if (replacement == null)
- throw new ArgumentNullException("replacement");
+ throw new ArgumentNullException(nameof(replacement));
Contract.EndContractBlock();
// Make sure it doesn't have bad surrogate pairs
@@ -60,7 +61,7 @@ namespace System.Text
break;
}
if (bFoundHigh)
- throw new ArgumentException(Environment.GetResourceString("Argument_InvalidCharSequenceNoIndex", "replacement"));
+ throw new ArgumentException(Environment.GetResourceString("Argument_InvalidCharSequenceNoIndex", nameof(replacement)));
strDefault = replacement;
}
@@ -147,7 +148,7 @@ namespace System.Text
{
// Double check input surrogate pair
if (!Char.IsHighSurrogate(charUnknownHigh))
- throw new ArgumentOutOfRangeException("charUnknownHigh",
+ throw new ArgumentOutOfRangeException(nameof(charUnknownHigh),
Environment.GetResourceString("ArgumentOutOfRange_Range",
0xD800, 0xDBFF));
@@ -189,7 +190,7 @@ namespace System.Text
}
// Now make sure its in the expected range
- Contract.Assert(fallbackIndex < strDefault.Length && fallbackIndex >= 0,
+ Debug.Assert(fallbackIndex < strDefault.Length && fallbackIndex >= 0,
"Index exceeds buffer range");
return strDefault[fallbackIndex];
@@ -220,7 +221,6 @@ namespace System.Text
}
// Clear the buffer
- [System.Security.SecuritySafeCritical] // auto-generated
public override unsafe void Reset()
{
fallbackCount = -1;