/// <summary> /// Constructor. /// </summary> /// <param name="characterReader">InputPipe to use for reading single characters.</param> public JsonRpcPipe(IInputPipe characterReader, IOutputPipe characterWriter) { this.characterReader = characterReader; this.characterWriter = characterWriter; this.blockQueue = new ConcurrentQueue <object>(); this.JsonSerializerSettings = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }; }
/// <summary> /// Constructs a CSV row reader from the given <paramref name="input"/>. /// </summary> /// <param name="input">The <see cref="IInputPipe"/> from which to read.</param> /// <param name="format">The <see cref="CsvFormat"/>.</param> /// <param name="firstLineIsHeader">Flag indicating whether the first line read contains the header. Defaults to true.</param> /// <exception cref="ArgumentNullException">Thrown if one of the arguments is null.</exception> public CsvReader(IInputPipe input, CsvFormat format, bool firstLineIsHeader = true) { // validate arguments if (input == null) throw new ArgumentNullException("input"); if (format == null) throw new ArgumentNullException("format"); // set values this.input = input; this.format = format; this.firstLineIsHeader = firstLineIsHeader; }
TPipe IOutputPipe <TOutput> .Attach <TPipe>(TPipe pipe) { this.Child = pipe; return(pipe); }
/// <summary> /// Constructor. /// </summary> /// <param name="characterReader">InputPipe to use for reading single characters.</param> public JsonBlockPipe(IInputPipe characterReader) { this.characterReader = characterReader; }