summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/CodePageEncoding.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Text/CodePageEncoding.cs
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Text/CodePageEncoding.cs')
-rw-r--r--src/mscorlib/src/System/Text/CodePageEncoding.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mscorlib/src/System/Text/CodePageEncoding.cs b/src/mscorlib/src/System/Text/CodePageEncoding.cs
index 9f1b2d2620..7805c6580a 100644
--- a/src/mscorlib/src/System/Text/CodePageEncoding.cs
+++ b/src/mscorlib/src/System/Text/CodePageEncoding.cs
@@ -11,6 +11,7 @@ namespace System.Text
using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
+ using System.Diagnostics;
using System.Diagnostics.Contracts;
/*=================================CodePageEncoding==================================
@@ -44,7 +45,7 @@ namespace System.Text
internal CodePageEncoding(SerializationInfo info, StreamingContext context)
{
// Any info?
- if (info==null) throw new ArgumentNullException("info");
+ if (info==null) throw new ArgumentNullException(nameof(info));
Contract.EndContractBlock();
// All versions have a code page
@@ -74,7 +75,6 @@ namespace System.Text
}
// Just get it from GetEncoding
- [System.Security.SecurityCritical] // auto-generated
public Object GetRealObject(StreamingContext context)
{
// Get our encoding (Note: This has default fallbacks for readonly and everett cases)
@@ -93,11 +93,10 @@ namespace System.Text
}
// ISerializable implementation
- [System.Security.SecurityCritical] // auto-generated_required
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
// We cannot ever call this.
- Contract.Assert(false, "Didn't expect to make it to CodePageEncoding ISerializable.GetObjectData");
+ Debug.Assert(false, "Didn't expect to make it to CodePageEncoding ISerializable.GetObjectData");
throw new ArgumentException(Environment.GetResourceString("Arg_ExecutionEngineException"));
}
@@ -113,25 +112,23 @@ namespace System.Text
internal Decoder(SerializationInfo info, StreamingContext context)
{
// Any info?
- if (info==null) throw new ArgumentNullException("info");
+ if (info==null) throw new ArgumentNullException(nameof(info));
Contract.EndContractBlock();
this.realEncoding = (Encoding)info.GetValue("encoding", typeof(Encoding));
}
// Just get it from GetDecider
- [System.Security.SecurityCritical] // auto-generated
public Object GetRealObject(StreamingContext context)
{
return this.realEncoding.GetDecoder();
}
// ISerializable implementation, get data for this object
- [System.Security.SecurityCritical] // auto-generated_required
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
// We cannot ever call this.
- Contract.Assert(false, "Didn't expect to make it to CodePageEncoding.Decoder.GetObjectData");
+ Debug.Assert(false, "Didn't expect to make it to CodePageEncoding.Decoder.GetObjectData");
throw new ArgumentException(Environment.GetResourceString("Arg_ExecutionEngineException"));
}
}