Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

StreamRedirector Class Reference

Used to redirect an output stream (StreamReader) to events of handler(string) -type. The class starts it owns thread to read from a StreamReader object. This is usefull when using System.Diagnostics.Process, as the process may block if the output and error stream are not from seperate threads. More...

List of all members.

Public Member Functions

delegate void OutputHandler (string output)
 StreamRedirector (StreamReader stream, OutputHandler handler)
void ReadUntilEnd ()

Private Member Functions

void Redirector ()

Private Attributes

OutputHandler _handler
StreamReader _stream
Thread readerThread


Detailed Description

Used to redirect an output stream (StreamReader) to events of handler(string) -type. The class starts it owns thread to read from a StreamReader object. This is usefull when using System.Diagnostics.Process, as the process may block if the output and error stream are not from seperate threads.


Constructor & Destructor Documentation

StreamRedirector::StreamRedirector StreamReader  stream,
OutputHandler  handler
[inline]
 


Member Function Documentation

delegate void StreamRedirector::OutputHandler string  output  ) 
 

void StreamRedirector::ReadUntilEnd  )  [inline]
 

void StreamRedirector::Redirector  )  [inline, private]
 


Member Data Documentation

OutputHandler StreamRedirector::_handler [private]
 

StreamReader StreamRedirector::_stream [private]
 

Thread StreamRedirector::readerThread [private]
 


The documentation for this class was generated from the following file: SourceForge.net Logo