public GrepSink(IMiniStreamSink dest, string regex, RegexOptions options) { this.dest = dest; this.regexes = new Regex[1]; this.regexes[0] = new Regex(regex, options); }
public GrepSink (IMiniStreamSink dest, string[] regexes, RegexOptions options) { this.dest = dest; this.regexes = new Regex[regexes.Length]; for (int i = 0; i < regexes.Length; i++) this.regexes[i] = new Regex (regexes[i], options); }
public SubstSink(IMiniStreamSink dest, SubstStyles styles) : base(dest) { if ((int)styles == 0) { throw new ArgumentException("Can't have empty substitution style"); } this.styles = styles; }
public GrepSink(IMiniStreamSink dest, string[] regexes, RegexOptions options) { this.dest = dest; this.regexes = new Regex[regexes.Length]; for (int i = 0; i < regexes.Length; i++) { this.regexes[i] = new Regex(regexes[i], options); } }
public MiniStream (IMiniStreamSink sink, Encoding encoding, int buf_size) { if (sink == null) throw new ArgumentNullException (); this.sink = sink; this.sb = new StringBuilder (); this.decoder = encoding.GetDecoder (); this.buf = new char[buf_size]; }
public void AddSink (IMiniStreamSink sink) { if (sink == null) throw new ArgumentNullException (); IMiniStreamSink[] newsinks = new IMiniStreamSink [sinks.Length + 1]; sinks.CopyTo (newsinks, 0); newsinks[sinks.Length] = sink; sinks = newsinks; }
// static public static void DrainStream (StreamReader reader, IMiniStreamSink sink) { if (reader == null) throw new ArgumentNullException ("reader"); if (sink == null) throw new ArgumentNullException ("sink"); string line; while ((line = reader.ReadLine ()) != null) sink.SendLine (line); sink.StreamDone (); }
public MiniStream(IMiniStreamSink sink, Encoding encoding, int buf_size) { if (sink == null) { throw new ArgumentNullException(); } this.sink = sink; this.sb = new StringBuilder(); this.decoder = encoding.GetDecoder(); this.buf = new char[buf_size]; }
public void AddSink(IMiniStreamSink sink) { if (sink == null) { throw new ArgumentNullException(); } IMiniStreamSink[] newsinks = new IMiniStreamSink [sinks.Length + 1]; sinks.CopyTo(newsinks, 0); newsinks[sinks.Length] = sink; sinks = newsinks; }
public static int Start(BinaryInfo info, string extra_args, TextReader stdin, IMiniStreamSink stdout, IMiniStreamSink stderr, IBuildContext ctxt) { StreamWriter stdout_stream = null; StreamWriter stderr_stream = null; if (stdout != null) { stdout_stream = new StreamWriter(new MiniStream(stdout)); } if (stderr != null) { stderr_stream = new StreamWriter(new MiniStream(stderr)); } return(Start(info, extra_args, stdin, stdout_stream, stderr_stream, ctxt)); }
// static public static void DrainStream(StreamReader reader, IMiniStreamSink sink) { if (reader == null) { throw new ArgumentNullException("reader"); } if (sink == null) { throw new ArgumentNullException("sink"); } string line; while ((line = reader.ReadLine()) != null) { sink.SendLine(line); } sink.StreamDone(); }
public MiniStream (IMiniStreamSink sink) : this (sink, Encoding.Default) {}
public static void DrainStream (MBFile file, IBuildContext ctxt, IMiniStreamSink sink) { DrainStream (file.OpenRead (ctxt), sink); }
public override void Close() { base.Close(); sink.StreamDone(); sink = null; }
public override void Close () { base.Close (); sink.StreamDone (); sink = null; }
public static void DrainStream (Stream stream, IMiniStreamSink sink) { using (StreamReader reader = new StreamReader (stream)) { DrainStream (reader, sink); } }
public MiniStream (IMiniStreamSink sink, Encoding encoding) : this (sink, encoding, 2048) {}
public TeeSink (IMiniStreamSink sink) { this.sinks = new IMiniStreamSink[1]; this.sinks[0] = sink; }
public GrepSink (IMiniStreamSink dest, string regex, RegexOptions options) { this.dest = dest; this.regexes = new Regex[1]; this.regexes[0] = new Regex (regex, options); }
public GrepSink(IMiniStreamSink dest, Regex[] regexes) { this.regexes = new Regex[regexes.Length]; regexes.CopyTo(this.regexes, 0); }
public GrepSink(IMiniStreamSink dest, string[] regexes) : this(dest, regexes, RegexOptions.None) { }
public SubstSink (IMiniStreamSink dest) : this (dest, SubstStyles.Autoconf) {}
public TeeSink(IMiniStreamSink sink) { this.sinks = new IMiniStreamSink[1]; this.sinks[0] = sink; }
protected SedSink(IMiniStreamSink dest) { this.dest = dest; this.regexes = new ArrayList(); this.repls = new ArrayList(); }
protected SedSink (IMiniStreamSink dest) { this.dest = dest; this.regexes = new ArrayList (); this.repls = new ArrayList (); }
public MiniStream(IMiniStreamSink sink, Encoding encoding) : this(sink, encoding, 2048) { }
public GrepSink (IMiniStreamSink dest, Regex[] regexes) { this.regexes = new Regex[regexes.Length]; regexes.CopyTo (this.regexes, 0); }
public MiniStream(IMiniStreamSink sink) : this(sink, Encoding.Default) { }
public GrepSink (IMiniStreamSink dest, string[] regexes) : this (dest, regexes, RegexOptions.None) {}
public static int Start (BinaryInfo info, string extra_args, TextReader stdin, IMiniStreamSink stdout, IMiniStreamSink stderr, IBuildContext ctxt) { StreamWriter stdout_stream = null; StreamWriter stderr_stream = null; if (stdout != null) stdout_stream = new StreamWriter (new MiniStream (stdout)); if (stderr != null) stderr_stream = new StreamWriter (new MiniStream (stderr)); return Start (info, extra_args, stdin, stdout_stream, stderr_stream, ctxt); }
public TeeSink (IMiniStreamSink[] sinks) { this.sinks = new IMiniStreamSink[sinks.Length]; sinks.CopyTo (this.sinks, 0); }
public static void DrainStream(Stream stream, IMiniStreamSink sink) { using (StreamReader reader = new StreamReader(stream)) { DrainStream(reader, sink); } }
public static void DrainStream(MBFile file, IBuildContext ctxt, IMiniStreamSink sink) { DrainStream(file.OpenRead(ctxt), sink); }
public SubstSink(IMiniStreamSink dest) : this(dest, SubstStyles.Autoconf) { }
public SubstSink (IMiniStreamSink dest, SubstStyles styles) : base (dest) { if ((int) styles == 0) throw new ArgumentException ("Can't have empty substitution style"); this.styles = styles; }