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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="ValidationEventArgs.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.     /// <include file='doc\ValidationEventArgs.uex' path='docs/doc[@for="ValidationEventArgs"]/*' />
  19.     /// <devdoc>
  20.     /// Returns detailed information relating to
  21.     /// the ValidationEventhandler.
  22.     /// </devdoc>
  23.     public class ValidationEventArgs : EventArgs
  24.     {
  25.         XmlSchemaException ex;
  26.         XmlSeverityType severity;
  27.        
  28.         internal ValidationEventArgs(XmlSchemaException ex) : base()
  29.         {
  30.             this.ex = ex;
  31.             severity = XmlSeverityType.Error;
  32.         }
  33.        
  34.         internal ValidationEventArgs(XmlSchemaException ex, XmlSeverityType severity) : base()
  35.         {
  36.             this.ex = ex;
  37.             this.severity = severity;
  38.         }
  39.        
  40.         /// <include file='doc\ValidationEventArgs.uex' path='docs/doc[@for="ValidationEventArgs.Severity"]/*' />
  41.         public XmlSeverityType Severity {
  42.             get { return severity; }
  43.         }
  44.        
  45.         /// <include file='doc\ValidationEventArgs.uex' path='docs/doc[@for="ValidationEventArgs.Exception"]/*' />
  46.         public XmlSchemaException Exception {
  47.             get { return ex; }
  48.         }
  49.        
  50.         /// <include file='doc\ValidationEventArgs.uex' path='docs/doc[@for="ValidationEventArgs.Message"]/*' />
  51.         /// <devdoc>
  52.         /// <para>Gets the text description corresponding to the
  53.         /// validation error.</para>
  54.         /// </devdoc>
  55.         public string Message {
  56.             get { return ex.Message; }
  57.         }
  58.     }
  59. }

Developer Fusion