System.Xml.Tests.TC_SchemaSet_EnableUpaCheck.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.Error)
            {
                _output.WriteLine("ERROR: ");
                bErrorCallback = true;
                XmlSchemaException se = args.Exception as XmlSchemaException;
                errorLineNumbers[errorCount] = se.LineNumber;
                errorCount++;

                _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");
            }
        }