The Labs \ Source Viewer \ SSCLI \ System.Xml.Schema \ XmlSchemaValidationException

  1. //------------------------------------------------------------------------------
  2. // <copyright file="XmlSchemaValidationException.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. // <owner current="true" primary="true">priyal</owner>
  15. //------------------------------------------------------------------------------
  16. namespace System.Xml.Schema
  17. {
  18.     using System;
  19.     using System.IO;
  20.     using System.Text;
  21.     using System.Resources;
  22.     using System.Runtime.Serialization;
  23.     using System.Diagnostics;
  24.     using System.Security.Permissions;
  25.    
  26.     /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException"]/*' />
  27.     [Serializable()]
  28.     public class XmlSchemaValidationException : XmlSchemaException
  29.     {
  30.        
  31.         private object sourceNodeObject;
  32.        
  33.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.XmlSchemaException5"]/*' />
  34.         protected XmlSchemaValidationException(SerializationInfo info, StreamingContext context) : base(info, context)
  35.         {
  36.         }
  37.        
  38.        
  39.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.GetObjectData"]/*' />
  40.         [SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
  41.         public override void GetObjectData(SerializationInfo info, StreamingContext context)
  42.         {
  43.             base.GetObjectData(info, context);
  44.         }
  45.        
  46.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.XmlSchemaException1"]/*' />
  47.         public XmlSchemaValidationException() : base(null)
  48.         {
  49.         }
  50.        
  51.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.XmlSchemaException2"]/*' />
  52.         public XmlSchemaValidationException(string message) : base(message, ((Exception)null), 0, 0)
  53.         {
  54.         }
  55.        
  56.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.XmlSchemaException0"]/*' />
  57.         public XmlSchemaValidationException(string message, Exception innerException) : base(message, innerException, 0, 0)
  58.         {
  59.         }
  60.        
  61.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.XmlSchemaException3"]/*' />
  62.         public XmlSchemaValidationException(string message, Exception innerException, int lineNumber, int linePosition) : base(message, innerException, lineNumber, linePosition)
  63.         {
  64.         }
  65.        
  66.         internal XmlSchemaValidationException(string res, string[] args) : base(res, args, null, null, 0, 0, null)
  67.         {
  68.         }
  69.        
  70.         internal XmlSchemaValidationException(string res, string arg) : base(res, new string[] {arg}, null, null, 0, 0, null)
  71.         {
  72.         }
  73.        
  74.         internal XmlSchemaValidationException(string res, string arg, string sourceUri, int lineNumber, int linePosition) : base(res, new string[] {arg}, null, sourceUri, lineNumber, linePosition, null)
  75.         {
  76.         }
  77.        
  78.         internal XmlSchemaValidationException(string res, string sourceUri, int lineNumber, int linePosition) : base(res, (string[])null, null, sourceUri, lineNumber, linePosition, null)
  79.         {
  80.         }
  81.        
  82.         internal XmlSchemaValidationException(string res, string[] args, string sourceUri, int lineNumber, int linePosition) : base(res, args, null, sourceUri, lineNumber, linePosition, null)
  83.         {
  84.         }
  85.        
  86.         internal XmlSchemaValidationException(string res, string[] args, Exception innerException, string sourceUri, int lineNumber, int linePosition) : base(res, args, innerException, sourceUri, lineNumber, linePosition, null)
  87.         {
  88.         }
  89.        
  90.         internal XmlSchemaValidationException(string res, string[] args, object sourceNode) : base(res, args, null, null, 0, 0, null)
  91.         {
  92.             this.sourceNodeObject = sourceNode;
  93.         }
  94.        
  95.         internal XmlSchemaValidationException(string res, string[] args, string sourceUri, object sourceNode) : base(res, args, null, sourceUri, 0, 0, null)
  96.         {
  97.             this.sourceNodeObject = sourceNode;
  98.         }
  99.        
  100.         internal XmlSchemaValidationException(string res, string[] args, string sourceUri, int lineNumber, int linePosition, XmlSchemaObject source, object sourceNode) : base(res, args, null, sourceUri, lineNumber, linePosition, source)
  101.         {
  102.             this.sourceNodeObject = sourceNode;
  103.         }
  104.        
  105.         /// <include file='doc\XmlSchemaException.uex' path='docs/doc[@for="XmlSchemaException.SourceUri"]/*' />
  106.         public object SourceObject {
  107.             get { return this.sourceNodeObject; }
  108.         }
  109.        
  110.         protected internal void SetSourceObject(object sourceObject)
  111.         {
  112.             this.sourceNodeObject = sourceObject;
  113.         }
  114.        
  115.     }
  116. }
  117. // namespace System.Xml.Schema

Developer Fusion