예제 #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);
        }
예제 #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;
		}