private void SendValidationEvent(XmlSchemaException e, XmlSeverityType severity) { this.schema.ErrorCount++; e.SetSchemaObject(this.schema); if (validationEventHandler != null) { validationEventHandler(null, new ValidationEventArgs(e, severity)); } else if (severity == XmlSeverityType.Error) { throw e; } }