Show / Hide Table of Contents

# Class FakeConsole

##### Inheritance

System.Object
FakeConsole

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public static class FakeConsole

### Fields

#### MockKeyPresses

##### Declaration

    public static Stack<ConsoleKeyInfo> MockKeyPresses

##### Field Value

Type | Description
--- | ---
System.Collections.Generic.Stack<System.ConsoleKeyInfo> |

### Properties

#### BackgroundColor

##### Declaration

    public static ConsoleColor BackgroundColor { get; set; }

##### Property Value

Type | Description
--- | ---
System.ConsoleColor |

#### BufferHeight

##### Declaration

    public static int BufferHeight { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### BufferWidth

##### Declaration

    public static int BufferWidth { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### CapsLock

##### Declaration

    public static bool CapsLock { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### CursorLeft

##### Declaration

    public static int CursorLeft { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### CursorSize

##### Declaration

    public static int CursorSize { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### CursorTop

##### Declaration

    public static int CursorTop { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### CursorVisible

##### Declaration

    public static bool CursorVisible { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### Error

##### Declaration

    public static TextWriter Error { get; }

##### Property Value

Type | Description
--- | ---
System.IO.TextWriter |

#### ForegroundColor

##### Declaration

    public static ConsoleColor ForegroundColor { get; set; }

##### Property Value

Type | Description
--- | ---
System.ConsoleColor |

#### In

##### Declaration

    public static TextReader In { get; }

##### Property Value

Type | Description
--- | ---
System.IO.TextReader |

#### InputEncoding

##### Declaration

    public static Encoding InputEncoding { get; set; }

##### Property Value

Type | Description
--- | ---
System.Text.Encoding |

#### IsErrorRedirected

##### Declaration

    public static bool IsErrorRedirected { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### IsInputRedirected

##### Declaration

    public static bool IsInputRedirected { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### IsOutputRedirected

##### Declaration

    public static bool IsOutputRedirected { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### KeyAvailable

##### Declaration

    public static bool KeyAvailable { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### LargestWindowHeight

##### Declaration

    public static int LargestWindowHeight { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### LargestWindowWidth

##### Declaration

    public static int LargestWindowWidth { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### NumberLock

##### Declaration

    public static bool NumberLock { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### Out

##### Declaration

    public static TextWriter Out { get; }

##### Property Value

Type | Description
--- | ---
System.IO.TextWriter |

#### OutputEncoding

##### Declaration

    public static Encoding OutputEncoding { get; set; }

##### Property Value

Type | Description
--- | ---
System.Text.Encoding |

#### Title

##### Declaration

    public static string Title { get; set; }

##### Property Value

Type | Description
--- | ---
System.String |

#### TreatControlCAsInput

##### Declaration

    public static bool TreatControlCAsInput { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

#### WindowHeight

##### Declaration

    public static int WindowHeight { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### WindowLeft

##### Declaration

    public static int WindowLeft { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### WindowTop

##### Declaration

    public static int WindowTop { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

#### WindowWidth

##### Declaration

    public static int WindowWidth { get; set; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

### Methods

#### Beep()

##### Declaration

    public static void Beep()

#### Beep(Int32, Int32)

##### Declaration

    public static void Beep(int frequency, int duration)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | frequency |
System.Int32 | duration |

#### Clear()

##### Declaration

    public static void Clear()

#### MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32)

##### Declaration

    public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | sourceLeft |
System.Int32 | sourceTop |
System.Int32 | sourceWidth |
System.Int32 | sourceHeight |
System.Int32 | targetLeft |
System.Int32 | targetTop |

#### MoveBufferArea(Int32, Int32, Int32, Int32, Int32, Int32, Char, ConsoleColor, ConsoleColor)

##### Declaration

    public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | sourceLeft |
System.Int32 | sourceTop |
System.Int32 | sourceWidth |
System.Int32 | sourceHeight |
System.Int32 | targetLeft |
System.Int32 | targetTop |
System.Char | sourceChar |
System.ConsoleColor | sourceForeColor |
System.ConsoleColor | sourceBackColor |

#### OpenStandardError()

##### Declaration

    public static Stream OpenStandardError()

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### OpenStandardError(Int32)

##### Declaration

    public static Stream OpenStandardError(int bufferSize)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | bufferSize |

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### OpenStandardInput()

##### Declaration

    public static Stream OpenStandardInput()

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### OpenStandardInput(Int32)

##### Declaration

    public static Stream OpenStandardInput(int bufferSize)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | bufferSize |

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### OpenStandardOutput()

##### Declaration

    public static Stream OpenStandardOutput()

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### OpenStandardOutput(Int32)

##### Declaration

    public static Stream OpenStandardOutput(int bufferSize)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | bufferSize |

##### Returns

Type | Description
--- | ---
System.IO.Stream |

#### Read()

##### Declaration

    public static int Read()

##### Returns

Type | Description
--- | ---
System.Int32 |

#### ReadKey()

##### Declaration

    public static ConsoleKeyInfo ReadKey()

##### Returns

Type | Description
--- | ---
System.ConsoleKeyInfo |

#### ReadKey(Boolean)

##### Declaration

    public static ConsoleKeyInfo ReadKey(bool intercept)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | intercept |

##### Returns

Type | Description
--- | ---
System.ConsoleKeyInfo |

#### ReadLine()

##### Declaration

    public static string ReadLine()

##### Returns

Type | Description
--- | ---
System.String |

#### ResetColor()

##### Declaration

    public static void ResetColor()

#### SetBufferSize(Int32, Int32)

##### Declaration

    public static void SetBufferSize(int width, int height)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | width |
System.Int32 | height |

#### SetCursorPosition(Int32, Int32)

##### Declaration

    public static void SetCursorPosition(int left, int top)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | left |
System.Int32 | top |

#### SetError(TextWriter)

##### Declaration

    public static void SetError(TextWriter newError)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.TextWriter | newError |

#### SetIn(TextReader)

##### Declaration

    public static void SetIn(TextReader newIn)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.TextReader | newIn |

#### SetOut(TextWriter)

##### Declaration

    public static void SetOut(TextWriter newOut)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.TextWriter | newOut |

#### SetWindowPosition(Int32, Int32)

##### Declaration

    public static void SetWindowPosition(int left, int top)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | left |
System.Int32 | top |

#### SetWindowSize(Int32, Int32)

##### Declaration

    public static void SetWindowSize(int width, int height)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | width |
System.Int32 | height |

#### Write(Boolean)

##### Declaration

    public static void Write(bool value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | value |

#### Write(Char)

##### Declaration

    public static void Write(char value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char | value |

#### Write(Char[])

##### Declaration

    public static void Write(char[] buffer)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char[] | buffer |

#### Write(Char[], Int32, Int32)

##### Declaration

    public static void Write(char[] buffer, int index, int count)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char[] | buffer |
System.Int32 | index |
System.Int32 | count |

#### Write(Decimal)

##### Declaration

    public static void Write(decimal value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Decimal | value |

#### Write(Double)

##### Declaration

    public static void Write(double value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Double | value |

#### Write(Int32)

##### Declaration

    public static void Write(int value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | value |

#### Write(Int64)

##### Declaration

    public static void Write(long value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | value |

#### Write(Object)

##### Declaration

    public static void Write(object value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | value |

#### Write(Single)

##### Declaration

    public static void Write(float value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | value |

#### Write(String)

##### Declaration

    public static void Write(string value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value |

#### Write(String, Object)

##### Declaration

    public static void Write(string format, object arg0)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |

#### Write(String, Object, Object)

##### Declaration

    public static void Write(string format, object arg0, object arg1)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |

#### Write(String, Object, Object, Object)

##### Declaration

    public static void Write(string format, object arg0, object arg1, object arg2)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |
System.Object | arg2 |

#### Write(String, Object, Object, Object, Object)

##### Declaration

    public static void Write(string format, object arg0, object arg1, object arg2, object arg3)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |
System.Object | arg2 |
System.Object | arg3 |

#### Write(String, Object[])

##### Declaration

    public static void Write(string format, params object[] arg)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object[] | arg |

#### Write(UInt32)

##### Declaration

    public static void Write(uint value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | value |

#### Write(UInt64)

##### Declaration

    public static void Write(ulong value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | value |

#### WriteLine()

##### Declaration

    public static void WriteLine()

#### WriteLine(Boolean)

##### Declaration

    public static void WriteLine(bool value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Boolean | value |

#### WriteLine(Char)

##### Declaration

    public static void WriteLine(char value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char | value |

#### WriteLine(Char[])

##### Declaration

    public static void WriteLine(char[] buffer)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char[] | buffer |

#### WriteLine(Char[], Int32, Int32)

##### Declaration

    public static void WriteLine(char[] buffer, int index, int count)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Char[] | buffer |
System.Int32 | index |
System.Int32 | count |

#### WriteLine(Decimal)

##### Declaration

    public static void WriteLine(decimal value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Decimal | value |

#### WriteLine(Double)

##### Declaration

    public static void WriteLine(double value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Double | value |

#### WriteLine(Int32)

##### Declaration

    public static void WriteLine(int value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | value |

#### WriteLine(Int64)

##### Declaration

    public static void WriteLine(long value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int64 | value |

#### WriteLine(Object)

##### Declaration

    public static void WriteLine(object value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | value |

#### WriteLine(Single)

##### Declaration

    public static void WriteLine(float value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | value |

#### WriteLine(String)

##### Declaration

    public static void WriteLine(string value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | value |

#### WriteLine(String, Object)

##### Declaration

    public static void WriteLine(string format, object arg0)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |

#### WriteLine(String, Object, Object)

##### Declaration

    public static void WriteLine(string format, object arg0, object arg1)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |

#### WriteLine(String, Object, Object, Object)

##### Declaration

    public static void WriteLine(string format, object arg0, object arg1, object arg2)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |
System.Object | arg2 |

#### WriteLine(String, Object, Object, Object, Object)

##### Declaration

    public static void WriteLine(string format, object arg0, object arg1, object arg2, object arg3)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object | arg0 |
System.Object | arg1 |
System.Object | arg2 |
System.Object | arg3 |

#### WriteLine(String, Object[])

##### Declaration

    public static void WriteLine(string format, params object[] arg)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Object[] | arg |

#### WriteLine(UInt32)

##### Declaration

    public static void WriteLine(uint value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt32 | value |

#### WriteLine(UInt64)

##### Declaration

    public static void WriteLine(ulong value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | value |