System.Xml.XPath.XPathNavigator.CheckValidityHelper.ValidationCallback C# (CSharp) Method

ValidationCallback() private method

private ValidationCallback ( object sender, ValidationEventArgs args ) : void
sender object
args System.Xml.Schema.ValidationEventArgs
return void
            internal void ValidationCallback(object sender, ValidationEventArgs args)
            {
                Debug.Assert(args != null);
                if (args.Severity == XmlSeverityType.Error)
                    _isValid = false;
                XmlSchemaValidationException exception = args.Exception as XmlSchemaValidationException;
                if (exception != null && _reader != null)
                    exception.SetSourceObject(_reader.UnderlyingObject);

                if (_nextEventHandler != null)
                {
                    _nextEventHandler(sender, args);
                }
                else if (exception != null && args.Severity == XmlSeverityType.Error)
                {
                    throw exception;
                }
            }
XPathNavigator.CheckValidityHelper