mscorlib(4.0.0.0) API with additions
EncoderFallback.cs
1 using System.Threading;
2 
3 namespace System.Text
4 {
7  [__DynamicallyInvokable]
8  public abstract class EncoderFallback
9  {
10  internal bool bIsMicrosoftBestFitFallback;
11 
12  private static volatile EncoderFallback replacementFallback;
13 
14  private static volatile EncoderFallback exceptionFallback;
15 
16  private static object s_InternalSyncObject;
17 
18  private static object InternalSyncObject
19  {
20  get
21  {
22  if (s_InternalSyncObject == null)
23  {
24  object value = new object();
25  Interlocked.CompareExchange<object>(ref s_InternalSyncObject, value, (object)null);
26  }
27  return s_InternalSyncObject;
28  }
29  }
30 
33  [__DynamicallyInvokable]
35  {
36  [__DynamicallyInvokable]
37  get
38  {
39  if (replacementFallback == null)
40  {
41  lock (InternalSyncObject)
42  {
43  if (replacementFallback == null)
44  {
45  replacementFallback = new EncoderReplacementFallback();
46  }
47  }
48  }
49  return replacementFallback;
50  }
51  }
52 
55  [__DynamicallyInvokable]
57  {
58  [__DynamicallyInvokable]
59  get
60  {
61  if (exceptionFallback == null)
62  {
63  lock (InternalSyncObject)
64  {
65  if (exceptionFallback == null)
66  {
67  exceptionFallback = new EncoderExceptionFallback();
68  }
69  }
70  }
71  return exceptionFallback;
72  }
73  }
74 
77  [__DynamicallyInvokable]
78  public abstract int MaxCharCount
79  {
80  [__DynamicallyInvokable]
81  get;
82  }
83 
86  [__DynamicallyInvokable]
88 
90  [__DynamicallyInvokable]
91  protected EncoderFallback()
92  {
93  }
94  }
95 }
static EncoderFallback ReplacementFallback
Gets an object that outputs a substitute string in place of an input character that cannot be encoded...
Definition: __Canon.cs:3
Provides a failure-handling mechanism, called a fallback, for an input character that cannot be conve...
EncoderFallback()
Initializes a new instance of the T:System.Text.EncoderFallback class.
Provides a failure handling mechanism, called a fallback, for an input character that cannot be conve...
static int CompareExchange(ref int location1, int value, int comparand)
Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.
Provides a failure-handling mechanism, called a fallback, for an input character that cannot be conve...
abstract int MaxCharCount
When overridden in a derived class, gets the maximum number of characters the current T:System....
Provides a buffer that allows a fallback handler to return an alternate string to an encoder when it ...
Specifies that the class can be serialized.
static EncoderFallback ExceptionFallback
Gets an object that throws an exception when an input character cannot be encoded.
abstract EncoderFallbackBuffer CreateFallbackBuffer()
When overridden in a derived class, initializes a new instance of the T:System.Text....
Provides atomic operations for variables that are shared by multiple threads.
Definition: Interlocked.cs:10