Microsoft.Protocols.TestSuites.Common.SchemaValidation.ValidationCallBack C# (CSharp) Method

ValidationCallBack() private static method

This method is a callback function which is used to record the schema validation errors and warnings.
private static ValidationCallBack ( object sender, ValidationEventArgs args ) : void
sender object An object instance which represents the sender of the events.
args System.Xml.Schema.ValidationEventArgs The ValidationEventArgs contains validation result.
return void
        private static void ValidationCallBack(object sender, ValidationEventArgs args)
        {
            if (args.Severity == XmlSeverityType.Warning)
            {
                validationResult = ValidationResult.Warning;
                xmlValidationWarnings.Add(args);
            }
            else
            {
                validationResult = ValidationResult.Error;
                xmlValidationErrors.Add(args);
            }
        }