public static XmlDictionaryReader CreateTextReader( Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) { XmlReaderSettings s = new XmlReaderSettings(); XmlNameTable nt = new NameTable(); XmlParserContext c = new XmlParserContext(nt, new XmlNamespaceManager(nt), String.Empty, XmlSpace.None, encoding); XmlDictionaryReader res = new XmlSimpleDictionaryReader(XmlReader.Create(stream, s, c), null, onClose); res.quotas = quotas; return(res); }
public static XmlDictionaryReader CreateTextReader ( Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose) { XmlReaderSettings s = new XmlReaderSettings (); XmlNameTable nt = new NameTable (); XmlParserContext c = new XmlParserContext (nt, new XmlNamespaceManager (nt), String.Empty, XmlSpace.None, encoding); XmlDictionaryReader res = new XmlSimpleDictionaryReader (XmlReader.Create (stream, s, c), null, onClose); res.quotas = quotas; return res; }