当前位置: 首页>>代码示例>>C#>>正文


C# XmlReaderSettings.GetEventHandler方法代码示例

本文整理汇总了C#中System.Xml.XmlReaderSettings.GetEventHandler方法的典型用法代码示例。如果您正苦于以下问题:C# XmlReaderSettings.GetEventHandler方法的具体用法?C# XmlReaderSettings.GetEventHandler怎么用?C# XmlReaderSettings.GetEventHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlReaderSettings的用法示例。


在下文中一共展示了XmlReaderSettings.GetEventHandler方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: XsdValidatingReader

 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();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:19,代码来源:XsdValidatingReader.cs

示例2: SetupValidator

 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();
     }
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:18,代码来源:XsdValidatingReader.cs

示例3: XsdValidatingReader

 //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();
 }
开发者ID:dotnet,项目名称:corefx,代码行数:19,代码来源:XsdValidatingReader.cs

示例4: CreateDtdValidatingReader

 private static XmlValidatingReaderImpl CreateDtdValidatingReader(XmlReader baseReader, XmlReaderSettings settings) {
     return new XmlValidatingReaderImpl(baseReader, settings.GetEventHandler(), (settings.ValidationFlags & XmlSchemaValidationFlags.ProcessIdentityConstraints) != 0);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:3,代码来源:xmlreader.cs

示例5: SetupValidator

 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();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:XsdValidatingReader.cs


注:本文中的System.Xml.XmlReaderSettings.GetEventHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。