C# Class PowerArgs.StdConsoleProvider

Used for internal implementation, but marked public for testing, please do not use. This is basically a wrapper around the system console.
Inheritance: IConsoleProvider
Datei anzeigen Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clears the console

Read ( ) : int

Reads the next character of input from the console

ReadALineOfConsoleOutput ( int y ) : string

Used for internal implementation, but marked public for testing, please do not use.

ReadKey ( ) : ConsoleKeyInfo

Used for internal implementation, but marked public for testing, please do not use.

ReadKey ( bool intercept ) : ConsoleKeyInfo

Reads a key from the console

ReadLine ( ) : string

Reads a line of text from the console

Write ( ConsoleCharacter consoleCharacter ) : void

Writes the given character to the console

Write ( ConsoleString consoleString ) : void

Writes the given string to the console

Write ( object output ) : void

Used for internal implementation, but marked public for testing, please do not use.

WriteLine ( ) : void

Used for internal implementation, but marked public for testing, please do not use.

WriteLine ( ConsoleString consoleString ) : void

Writes the given string to the console, followed by a newline

WriteLine ( object output ) : void

Used for internal implementation, but marked public for testing, please do not use.

Private Methods

Method Description
CreateKeyMap ( ) : ConsoleKeyInfo>.Dictionary
GetStdHandle ( int nStdHandle ) : IntPtr
ReadConsoleOutputCharacter ( IntPtr hConsoleOutput, [ lpCharacter, uint nLength, COORD dwReadCoord, uint &lpNumberOfCharsRead ) : bool

Method Details

Clear() public method

Clears the console
public Clear ( ) : void
return void

Read() public method

Reads the next character of input from the console
public Read ( ) : int
return int

ReadALineOfConsoleOutput() public static method

Used for internal implementation, but marked public for testing, please do not use.
public static ReadALineOfConsoleOutput ( int y ) : string
y int Used for internal implementation, but marked public for testing, please do not use.
return string

ReadKey() public method

Used for internal implementation, but marked public for testing, please do not use.
public ReadKey ( ) : ConsoleKeyInfo
return System.ConsoleKeyInfo

ReadKey() public method

Reads a key from the console
public ReadKey ( bool intercept ) : ConsoleKeyInfo
intercept bool if true, intercept the key before it is shown on the console
return System.ConsoleKeyInfo

ReadLine() public method

Reads a line of text from the console
public ReadLine ( ) : string
return string

Write() public method

Writes the given character to the console
public Write ( ConsoleCharacter consoleCharacter ) : void
consoleCharacter ConsoleCharacter the character to write
return void

Write() public method

Writes the given string to the console
public Write ( ConsoleString consoleString ) : void
consoleString ConsoleString the string to write
return void

Write() public method

Used for internal implementation, but marked public for testing, please do not use.
public Write ( object output ) : void
output object Used for internal implementation, but marked public for testing, please do not use.
return void

WriteLine() public method

Used for internal implementation, but marked public for testing, please do not use.
public WriteLine ( ) : void
return void

WriteLine() public method

Writes the given string to the console, followed by a newline
public WriteLine ( ConsoleString consoleString ) : void
consoleString ConsoleString the string to write
return void

WriteLine() public method

Used for internal implementation, but marked public for testing, please do not use.
public WriteLine ( object output ) : void
output object Used for internal implementation, but marked public for testing, please do not use.
return void