Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
		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;
		}