summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/EncoderFallback.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Text/EncoderFallback.cs')
-rw-r--r--src/mscorlib/src/System/Text/EncoderFallback.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mscorlib/src/System/Text/EncoderFallback.cs b/src/mscorlib/src/System/Text/EncoderFallback.cs
index 4b170414d5..db2bf93bdd 100644
--- a/src/mscorlib/src/System/Text/EncoderFallback.cs
+++ b/src/mscorlib/src/System/Text/EncoderFallback.cs
@@ -5,6 +5,7 @@
using System;
using System.Security;
using System.Threading;
+using System.Diagnostics;
using System.Diagnostics.Contracts;
namespace System.Text
@@ -111,9 +112,7 @@ namespace System.Text
// Internal items to help us figure out what we're doing as far as error messages, etc.
// These help us with our performance and messages internally
- [SecurityCritical]
internal unsafe char* charStart;
- [SecurityCritical]
internal unsafe char* charEnd;
internal EncoderNLS encoder;
internal bool setEncoder;
@@ -124,7 +123,6 @@ namespace System.Text
// Internal Reset
// For example, what if someone fails a conversion and wants to reset one of our fallback buffers?
- [System.Security.SecurityCritical] // auto-generated
internal unsafe void InternalReset()
{
charStart = null;
@@ -135,7 +133,6 @@ namespace System.Text
// Set the above values
// This can't be part of the constructor because EncoderFallbacks would have to know how to impliment these.
- [System.Security.SecurityCritical] // auto-generated
internal unsafe void InternalInitialize(char* charStart, char* charEnd, EncoderNLS encoder, bool setEncoder)
{
this.charStart = charStart;
@@ -163,11 +160,10 @@ namespace System.Text
// Note that this could also change the contents of this.encoder, which is the same
// object that the caller is using, so the caller could mess up the encoder for us
// if they aren't careful.
- [System.Security.SecurityCritical] // auto-generated
internal unsafe virtual bool InternalFallback(char ch, ref char* chars)
{
// Shouldn't have null charStart
- Contract.Assert(charStart != null,
+ Debug.Assert(charStart != null,
"[EncoderFallback.InternalFallbackBuffer]Fallback buffer is not initialized");
// Get our index, remember chars was preincremented to point at next char, so have to -1