comparison Implab/JSON/JSONXmlReader.cs @ 79:05e6468f066f v2

sync
author cin
date Mon, 22 Sep 2014 18:20:49 +0400
parents 05f74c39a143
children abe260860bd6
comparison
equal deleted inserted replaced
78:05f74c39a143 79:05e6468f066f
309 309
310 public static JSONXmlReader Create(string file, JSONXmlReaderOptions options) { 310 public static JSONXmlReader Create(string file, JSONXmlReaderOptions options) {
311 return Create(File.OpenText(file), options); 311 return Create(File.OpenText(file), options);
312 } 312 }
313 313
314 /// <summary>
315 /// Creates the XmlReader for the specified text stream with JSON data.
316 /// </summary>
317 /// <param name="reader">Text reader.</param>
318 /// <param name="options">Options.</param>
319 /// <remarks>
320 /// The reader will be disposed when the XmlReader is disposed.
321 /// </remarks>
314 public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) { 322 public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) {
315 return new JSONXmlReader(new JSONParser(reader, true), options); 323 return new JSONXmlReader(new JSONParser(reader, true), options);
316 } 324 }
317 325
326 /// <summary>
327 /// Creates the XmlReader for the specified stream with JSON data.
328 /// </summary>
329 /// <param name="stream">Stream.</param>
330 /// <param name="options">Options.</param>
331 /// <remarks>
332 /// The stream will be disposed when the XmlReader is disposed.
333 /// </remarks>
318 public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) { 334 public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) {
319 Safe.ArgumentNotNull(stream, "stream"); 335 Safe.ArgumentNotNull(stream, "stream");
320 // HACK don't dispose StreaReader to keep stream opened 336 // HACK don't dispose StreaReader to keep stream opened
321 return Create(new StreamReader(stream), options); 337 return Create(new StreamReader(stream), options);
322 } 338 }