2 // XmlSchemaValidationException.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 using System.Globalization;
35 using System.Runtime.Serialization;
36 using System.Security.Permissions;
38 namespace System.Xml.Schema
41 public class XmlSchemaValidationException : XmlSchemaException
45 public XmlSchemaValidationException ()
50 public XmlSchemaValidationException (string message)
55 protected XmlSchemaValidationException (SerializationInfo info, StreamingContext context)
56 : base (info, context)
60 public XmlSchemaValidationException (string message, Exception innerException, int lineNumber, int linePosition)
61 : base (message, lineNumber, linePosition, null, null, innerException)
65 internal XmlSchemaValidationException (string message, int lineNumber, int linePosition,
66 XmlSchemaObject sourceObject, string sourceUri, Exception innerException)
67 : base (message, lineNumber, linePosition, sourceObject, sourceUri, innerException)
71 internal XmlSchemaValidationException (string message, object sender,
72 string sourceUri, XmlSchemaObject sourceObject, Exception innerException)
73 : base (message, sender, sourceUri, sourceObject, innerException)
77 internal XmlSchemaValidationException (string message, XmlSchemaObject sourceObject,
78 Exception innerException)
79 : base (message, sourceObject, innerException)
83 public XmlSchemaValidationException (string message, Exception innerException)
84 : base (message, innerException)
88 [SecurityPermission (SecurityAction.LinkDemand,
89 Flags=SecurityPermissionFlag.SerializationFormatter)]
90 public override void GetObjectData (
91 SerializationInfo info, StreamingContext context)
93 base.GetObjectData (info, context);
96 // Never use it. It actually does nothing even on MS.NET 2.0.
97 protected internal void SetSourceObject (object o)
102 public object SourceObject {
103 get { return source_object; }