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;