private GetEventHandler ( ) : ValidationEventHandler | ||
Результат | ValidationEventHandler |
internal XsdValidatingReader(XmlReader reader, XmlResolver xmlResolver, XmlReaderSettings readerSettings, XmlSchemaObject partialValidationType) { this.xmlCharType = XmlCharType.Instance; this.coreReader = reader; this.coreReaderNSResolver = reader as IXmlNamespaceResolver; this.lineInfo = reader as IXmlLineInfo; this.coreReaderNameTable = this.coreReader.NameTable; if (this.coreReaderNSResolver == null) { this.nsManager = new XmlNamespaceManager(this.coreReaderNameTable); this.manageNamespaces = true; } this.thisNSResolver = this; this.xmlResolver = xmlResolver; this.processInlineSchema = (readerSettings.ValidationFlags & XmlSchemaValidationFlags.ProcessInlineSchema) != XmlSchemaValidationFlags.None; this.Init(); this.SetupValidator(readerSettings, reader, partialValidationType); this.validationEvent = readerSettings.GetEventHandler(); }
private void SetupValidator(XmlReaderSettings readerSettings, XmlReader reader, XmlSchemaObject partialValidationType) { validator = new XmlSchemaValidator(coreReaderNameTable, readerSettings.Schemas, thisNSResolver, readerSettings.ValidationFlags); validator.XmlResolver = this.xmlResolver; validator.SourceUri = XmlConvert.ToUri(reader.BaseURI); //Not using XmlResolver.ResolveUri as it checks for relative Uris,reader.BaseURI will be absolute file paths or string.Empty validator.ValidationEventSender = this; validator.ValidationEventHandler += readerSettings.GetEventHandler(); validator.LineInfoProvider = this.lineInfo; if (validator.ProcessSchemaHints) { validator.SchemaSet.ReaderSettings.DtdProcessing = readerSettings.DtdProcessing; } validator.SetDtdSchemaInfo(reader.DtdInfo); if (partialValidationType != null) { validator.Initialize(partialValidationType); } else { validator.Initialize(); } }
//Constructor internal XsdValidatingReader(XmlReader reader, XmlResolver xmlResolver, XmlReaderSettings readerSettings, XmlSchemaObject partialValidationType) { _coreReader = reader; _coreReaderNSResolver = reader as IXmlNamespaceResolver; _lineInfo = reader as IXmlLineInfo; _coreReaderNameTable = _coreReader.NameTable; if (_coreReaderNSResolver == null) { _nsManager = new XmlNamespaceManager(_coreReaderNameTable); _manageNamespaces = true; } _thisNSResolver = this as IXmlNamespaceResolver; _xmlResolver = xmlResolver; _processInlineSchema = (readerSettings.ValidationFlags & XmlSchemaValidationFlags.ProcessInlineSchema) != 0; Init(); SetupValidator(readerSettings, reader, partialValidationType); _validationEvent = readerSettings.GetEventHandler(); }
private static XmlValidatingReaderImpl CreateDtdValidatingReader(XmlReader baseReader, XmlReaderSettings settings) { return new XmlValidatingReaderImpl(baseReader, settings.GetEventHandler(), (settings.ValidationFlags & XmlSchemaValidationFlags.ProcessIdentityConstraints) != 0); }
private void SetupValidator(XmlReaderSettings readerSettings, XmlReader reader, XmlSchemaObject partialValidationType) { this.validator = new XmlSchemaValidator(this.coreReaderNameTable, readerSettings.Schemas, this.thisNSResolver, readerSettings.ValidationFlags); this.validator.XmlResolver = this.xmlResolver; this.validator.SourceUri = XmlConvert.ToUri(reader.BaseURI); this.validator.ValidationEventSender = this; this.validator.ValidationEventHandler += readerSettings.GetEventHandler(); this.validator.LineInfoProvider = this.lineInfo; if (this.validator.ProcessSchemaHints) { this.validator.SchemaSet.ReaderSettings.DtdProcessing = readerSettings.DtdProcessing; } this.validator.SetDtdSchemaInfo(reader.DtdInfo); if (partialValidationType != null) { this.validator.Initialize(partialValidationType); } else { this.validator.Initialize(); } }