public CommentIgnoringJsonTextReader(TextReader reader) : this(BlockingTextReader.Create(reader)) { }
/// <summary> /// Loads a Result Set from an Input using a Results Handler /// </summary> /// <param name="handler">Results Handler to use</param> /// <param name="input">Input to read from</param> public void Load(ISparqlResultsHandler handler, TextReader input) { if (handler == null) { throw new RdfParseException("Cannot parse SPARQL Results into a null Result Handler"); } if (input == null) { throw new RdfParseException("Cannot parse SPARQL Results from a null input stream"); } try { TokenisingResultParserContext context = new TokenisingResultParserContext(handler, new TsvTokeniser(BlockingTextReader.Create(input))); this.TryParseResults(context); input.Close(); } catch { try { input.Close(); } catch { //No catch actions just trying to clean up } throw; } }