13 private string[] args;
15 private string sourceUri;
17 private int lineNumber;
19 private int linePosition;
24 private string message;
26 internal string GetRes => res;
28 internal string[] Args => args;
66 res = (string)info.GetValue(
"res", typeof(
string));
67 args = (
string[])info.GetValue(
"args", typeof(
string[]));
68 sourceUri = (string)info.GetValue(
"sourceUri", typeof(
string));
69 lineNumber = (int)info.GetValue(
"lineNumber", typeof(
int));
70 linePosition = (int)info.GetValue(
"linePosition", typeof(
int));
76 if (current.
Name ==
"version")
78 text = (string)current.
Value;
83 message = CreateMessage(res, args);
97 base.GetObjectData(info, context);
98 info.AddValue(
"res", res);
99 info.AddValue(
"args", args);
100 info.AddValue(
"sourceUri", sourceUri);
101 info.AddValue(
"lineNumber", lineNumber);
102 info.AddValue(
"linePosition", linePosition);
103 info.AddValue(
"version",
"2.0");
123 : this(message, innerException, 0, 0)
133 : this((message == null) ?
"Sch_DefaultException" :
"Xml_UserException", new string[1]
136 }, innerException,
null, lineNumber, linePosition,
null)
141 : this(res, args, null, null, 0, 0, null)
146 : this(res, new string[1]
149 },
null,
null, 0, 0,
null)
153 internal XmlSchemaException(
string res,
string arg,
string sourceUri,
int lineNumber,
int linePosition)
154 : this(res, new string[1]
157 },
null, sourceUri, lineNumber, linePosition,
null)
161 internal XmlSchemaException(
string res,
string sourceUri,
int lineNumber,
int linePosition)
162 : this(res, null, null, sourceUri, lineNumber, linePosition, null)
166 internal XmlSchemaException(
string res,
string[] args,
string sourceUri,
int lineNumber,
int linePosition)
167 : this(res, args, null, sourceUri, lineNumber, linePosition, null)
172 : this(res, (string[])null, source)
177 : this(res, new string[1]
189 internal XmlSchemaException(
string res,
string[] args,
Exception innerException,
string sourceUri,
int lineNumber,
int linePosition, XmlSchemaObject source)
190 : base(CreateMessage(res, args), innerException)
192 base.HResult = -2146231999;
195 this.sourceUri = sourceUri;
196 this.lineNumber = lineNumber;
197 this.linePosition = linePosition;
198 sourceSchemaObject = source;
201 internal static string CreateMessage(
string res,
string[] args)
205 return Res.GetString(res, args);
209 return "UNKNOWN(" + res +
")";
213 internal void SetSource(
string sourceUri,
int lineNumber,
int linePosition)
215 this.sourceUri = sourceUri;
216 this.lineNumber = lineNumber;
217 this.linePosition = linePosition;
220 internal void SetSchemaObject(XmlSchemaObject source)
222 sourceSchemaObject = source;
225 internal void SetSource(XmlSchemaObject source)
227 sourceSchemaObject = source;
229 lineNumber = source.LineNumber;
230 linePosition = source.LinePosition;
233 internal void SetResourceId(
string resourceId)
Describes a set of security permissions applied to code. This class cannot be inherited.
XmlSchemaException()
Initializes a new instance of the T:System.Xml.Schema.XmlSchemaException class.
Serves as the base class for system exceptions namespace.
XmlSchemaException(string message)
Initializes a new instance of the T:System.Xml.Schema.XmlSchemaException class with the exception mes...
Represents the root class for the Xml schema object model hierarchy and serves as a base class for cl...
int LineNumber
Gets the line number indicating where the error occurred.
XmlSchemaObject SourceSchemaObject
The XmlSchemaObject that produced the XmlSchemaException.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
SecurityAction
Specifies the security actions that can be performed using declarative security.
XmlSchemaException(SerializationInfo info, StreamingContext context)
Constructs a new XmlSchemaException object with the given SerializationInfo and StreamingContext info...
string SourceUri
Gets the Uniform Resource Identifier (URI) location of the schema that caused the exception.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
The exception that is thrown if the main assembly does not contain the resources for the neutral cult...
int LinePosition
Gets the line position indicating where the error occurred.
Exception()
Initializes a new instance of the T:System.Exception class.
XmlSchemaException(string message, Exception innerException)
Initializes a new instance of the T:System.Xml.Schema.XmlSchemaException class with the exception mes...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
string SourceUri
Gets or sets the source location for the file that loaded the schema.
Specifies that the class can be serialized.
override void GetObjectData(SerializationInfo info, StreamingContext context)
Streams all the XmlSchemaException properties into the SerializationInfo class for the given Streamin...
Holds the value, T:System.Type, and name of a serialized object.
Returns detailed information about the schema exception.
Provides a formatter-friendly mechanism for parsing the data in T:System.Runtime.Serialization....
object Value
Gets the value contained in the object.
string Name
Gets the name of the object.
override string Message
Gets the description of the error condition of this exception.
bool MoveNext()
Updates the enumerator to the next item.