Xeno-rat
Loading...
Searching...
No Matches
xeno_rat_client.CapturingConsoleWriter Class Reference
Inheritance diagram for xeno_rat_client.CapturingConsoleWriter:
Collaboration diagram for xeno_rat_client.CapturingConsoleWriter:

Public Member Functions

 CapturingConsoleWriter (TextWriter originalOut)
 
override void Write (char value)
 Writes a character to the output and captures the output in the process log.
 
override void WriteLine (string value)
 Writes a string to the output stream, capturing the output with a new line and continuing to write to the original output.
 
string GetCapturedOutput ()
 Returns the captured output from the ProcessLog as a string.
 
void ClearCapturedOutput ()
 Clears the captured output in the Program's log.
 

Properties

override Encoding Encoding [get]
 

Private Attributes

readonly TextWriter originalOut
 

Constructor & Destructor Documentation

◆ CapturingConsoleWriter()

xeno_rat_client.CapturingConsoleWriter.CapturingConsoleWriter ( TextWriter originalOut)
inline

Member Function Documentation

◆ ClearCapturedOutput()

void xeno_rat_client.CapturingConsoleWriter.ClearCapturedOutput ( )
inline

Clears the captured output in the Program's log.

This method clears the captured output stored in the Program's log by clearing the contents of the log.

◆ GetCapturedOutput()

string xeno_rat_client.CapturingConsoleWriter.GetCapturedOutput ( )
inline

Returns the captured output from the ProcessLog as a string.

Returns
The captured output from the ProcessLog as a string.

◆ Write()

override void xeno_rat_client.CapturingConsoleWriter.Write ( char value)
inline

Writes a character to the output and captures the output in the process log.

Parameters
valueThe character to be written to the output.

This method captures the output by appending the value to the process log using the Program.ProcessLog property. It then continues to write the value to the original output using the originalOut property.

◆ WriteLine()

override void xeno_rat_client.CapturingConsoleWriter.WriteLine ( string value)
inline

Writes a string to the output stream, capturing the output with a new line and continuing to write to the original output.

Parameters
valueThe string to be written to the output stream.

This method captures the output with a new line using the Program.ProcessLog and continues to write to the original output using originalOut.

Member Data Documentation

◆ originalOut

readonly TextWriter xeno_rat_client.CapturingConsoleWriter.originalOut
private

Property Documentation

◆ Encoding

override Encoding xeno_rat_client.CapturingConsoleWriter.Encoding
get

The documentation for this class was generated from the following file: