# HG changeset patch
# User cin
# Date 2014-09-22 14:20:49
# Node ID 05e6468f066fe4b05297d6a473d3f4b50db6167d
# Parent 05f74c39a1434884b068b785cd59dd53652b004a
sync
diff --git a/Implab/JSON/JSONXmlReader.cs b/Implab/JSON/JSONXmlReader.cs
--- a/Implab/JSON/JSONXmlReader.cs
+++ b/Implab/JSON/JSONXmlReader.cs
@@ -311,10 +311,26 @@ namespace Implab.JSON {
return Create(File.OpenText(file), options);
}
+ ///
+ /// Creates the XmlReader for the specified text stream with JSON data.
+ ///
+ /// Text reader.
+ /// Options.
+ ///
+ /// The reader will be disposed when the XmlReader is disposed.
+ ///
public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) {
return new JSONXmlReader(new JSONParser(reader, true), options);
}
+ ///
+ /// Creates the XmlReader for the specified stream with JSON data.
+ ///
+ /// Stream.
+ /// Options.
+ ///
+ /// The stream will be disposed when the XmlReader is disposed.
+ ///
public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) {
Safe.ArgumentNotNull(stream, "stream");
// HACK don't dispose StreaReader to keep stream opened
diff --git a/Implab/Parsing/Scanner.cs b/Implab/Parsing/Scanner.cs
--- a/Implab/Parsing/Scanner.cs
+++ b/Implab/Parsing/Scanner.cs
@@ -41,7 +41,7 @@ namespace Implab.Parsing {
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;