Mercurial > pub > ImplabNet
changeset 79:05e6468f066f v2
sync
author | cin |
---|---|
date | Mon, 22 Sep 2014 18:20:49 +0400 |
parents | 05f74c39a143 |
children | 4f20870d0816 |
files | Implab/JSON/JSONXmlReader.cs Implab/Parsing/Scanner.cs |
diffstat | 2 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Implab/JSON/JSONXmlReader.cs Thu Sep 11 17:45:15 2014 +0400 +++ b/Implab/JSON/JSONXmlReader.cs Mon Sep 22 18:20:49 2014 +0400 @@ -311,10 +311,26 @@ return Create(File.OpenText(file), options); } + /// <summary> + /// Creates the XmlReader for the specified text stream with JSON data. + /// </summary> + /// <param name="reader">Text reader.</param> + /// <param name="options">Options.</param> + /// <remarks> + /// The reader will be disposed when the XmlReader is disposed. + /// </remarks> public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) { return new JSONXmlReader(new JSONParser(reader, true), options); } + /// <summary> + /// Creates the XmlReader for the specified stream with JSON data. + /// </summary> + /// <param name="stream">Stream.</param> + /// <param name="options">Options.</param> + /// <remarks> + /// The stream will be disposed when the XmlReader is disposed. + /// </remarks> public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) { Safe.ArgumentNotNull(stream, "stream"); // HACK don't dispose StreaReader to keep stream opened
--- a/Implab/Parsing/Scanner.cs Thu Sep 11 17:45:15 2014 +0400 +++ b/Implab/Parsing/Scanner.cs Mon Sep 22 18:20:49 2014 +0400 @@ -41,7 +41,7 @@ int m_chunkSize = 1024; // 1k int m_limit = 10 * 1024 * 1024; // 10Mb - public Scanner(CDFADefinition definition) { + protected Scanner(CDFADefinition definition) { Safe.ArgumentNotNull(definition, "definition"); m_states = definition.States;