System.Xml.Tests.TC_SchemaSet_AllowXmlAttributes.ValidationCallback C# (CSharp) Method

ValidationCallback() public method

public ValidationCallback ( object sender, ValidationEventArgs args ) : void
sender object
args System.Xml.Schema.ValidationEventArgs
return void
        public void ValidationCallback(object sender, ValidationEventArgs args)
        {
            if (args.Severity == XmlSeverityType.Warning)
            {
                _output.WriteLine("WARNING: ");
                bWarningCallback = true;
                warningCount++;
            }
            else if (args.Severity == XmlSeverityType.Error)
            {
                _output.WriteLine("ERROR: ");
                bErrorCallback = true;
                errorCount++;
            }

            XmlSchemaException se = args.Exception as XmlSchemaException;
            _output.WriteLine("Exception Message:" + se.Message + "\n");
            if (se.InnerException != null)
            {
                _output.WriteLine("InnerException Message:" + se.InnerException.Message + "\n");
            }
            else

                _output.WriteLine("Inner Exception is NULL\n");
        }