mscorlib(4.0.0.0) API with additions
EncoderFallbackException.cs
2 
3 namespace System.Text
4 {
7  [__DynamicallyInvokable]
9  {
10  private char charUnknown;
11 
12  private char charUnknownHigh;
13 
14  private char charUnknownLow;
15 
16  private int index;
17 
20  [__DynamicallyInvokable]
21  public char CharUnknown
22  {
23  [__DynamicallyInvokable]
24  get
25  {
26  return charUnknown;
27  }
28  }
29 
32  [__DynamicallyInvokable]
33  public char CharUnknownHigh
34  {
35  [__DynamicallyInvokable]
36  get
37  {
38  return charUnknownHigh;
39  }
40  }
41 
44  [__DynamicallyInvokable]
45  public char CharUnknownLow
46  {
47  [__DynamicallyInvokable]
48  get
49  {
50  return charUnknownLow;
51  }
52  }
53 
56  [__DynamicallyInvokable]
57  public int Index
58  {
59  [__DynamicallyInvokable]
60  get
61  {
62  return index;
63  }
64  }
65 
67  [__DynamicallyInvokable]
69  : base(Environment.GetResourceString("Arg_ArgumentException"))
70  {
71  SetErrorCode(-2147024809);
72  }
73 
76  [__DynamicallyInvokable]
77  public EncoderFallbackException(string message)
78  : base(message)
79  {
80  SetErrorCode(-2147024809);
81  }
82 
86  [__DynamicallyInvokable]
87  public EncoderFallbackException(string message, Exception innerException)
88  : base(message, innerException)
89  {
90  SetErrorCode(-2147024809);
91  }
92 
94  : base(info, context)
95  {
96  }
97 
98  internal EncoderFallbackException(string message, char charUnknown, int index)
99  : base(message)
100  {
101  this.charUnknown = charUnknown;
102  this.index = index;
103  }
104 
105  internal EncoderFallbackException(string message, char charUnknownHigh, char charUnknownLow, int index)
106  : base(message)
107  {
108  if (!char.IsHighSurrogate(charUnknownHigh))
109  {
110  throw new ArgumentOutOfRangeException("charUnknownHigh", Environment.GetResourceString("ArgumentOutOfRange_Range", 55296, 56319));
111  }
112  if (!char.IsLowSurrogate(charUnknownLow))
113  {
114  throw new ArgumentOutOfRangeException("CharUnknownLow", Environment.GetResourceString("ArgumentOutOfRange_Range", 56320, 57343));
115  }
116  this.charUnknownHigh = charUnknownHigh;
117  this.charUnknownLow = charUnknownLow;
118  this.index = index;
119  }
120 
124  [__DynamicallyInvokable]
125  public bool IsUnknownSurrogate()
126  {
127  return charUnknownHigh != '\0';
128  }
129  }
130 }
char CharUnknownHigh
Gets the high component character of the surrogate pair that caused the exception.
Definition: __Canon.cs:3
int Index
Gets the index position in the input buffer of the character that caused the exception.
EncoderFallbackException()
Initializes a new instance of the T:System.Text.EncoderFallbackException class.
The exception that is thrown when an encoder fallback operation fails. This class cannot be inherited...
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
char CharUnknown
Gets the input character that caused the exception.
EncoderFallbackException(string message)
Initializes a new instance of the T:System.Text.EncoderFallbackException class. A parameter specifies...
char CharUnknownLow
Gets the low component character of the surrogate pair that caused the exception.
bool IsUnknownSurrogate()
Indicates whether the input that caused the exception is a surrogate pair.
EncoderFallbackException(string message, Exception innerException)
Initializes a new instance of the T:System.Text.EncoderFallbackException class. Parameters specify th...
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
The exception that is thrown when one of the arguments provided to a method is not valid.
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Definition: Exception.cs:22
Specifies that the class can be serialized.