Show / Hide Table of Contents

Class Console

The Log73 console.

Inheritance
System.Object
Console
Namespace: Log73
Assembly: Log73.dll
Syntax
public static class Console : object

Fields

| Improve this Doc View Source

Configure

Declaration
public static readonly ConsoleConfigureObject Configure
Field Value
Type Description
ConsoleConfigureObject
| Improve this Doc View Source

Object

Declaration
public static readonly ConsoleLogObject Object
Field Value
Type Description
ConsoleLogObject
| Improve this Doc View Source

Options

Declaration
public static ConsoleOptions Options
Field Value
Type Description
ConsoleOptions

Properties

| Improve this Doc View Source

BufferHeight

Declaration
public static int BufferHeight { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

BufferWidth

Declaration
public static int BufferWidth { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CapsLock

Declaration
public static bool CapsLock { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CursorLeft

Declaration
public static int CursorLeft { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CursorSize

Declaration
public static int CursorSize { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CursorTop

Declaration
public static int CursorTop { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CursorVisible

Declaration
public static bool CursorVisible { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Err

Set to by default.

Declaration
public static TextWriter Err { get; set; }
Property Value
Type Description
TextWriter
| Improve this Doc View Source

In

Set to by default.

Declaration
public static TextReader In { get; set; }
Property Value
Type Description
TextReader
| Improve this Doc View Source

InputEncoding

Declaration
public static Encoding InputEncoding { get; set; }
Property Value
Type Description
Encoding
| Improve this Doc View Source

IsErrorRedirected

Declaration
public static bool IsErrorRedirected { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsInputRedirected

Declaration
public static bool IsInputRedirected { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsOutputRedirected

Declaration
public static bool IsOutputRedirected { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

KeyAvailable

Declaration
public static bool KeyAvailable { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LargerWindowHeight

Declaration
public static int LargerWindowHeight { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

LargerWindowWidth

Declaration
public static int LargerWindowWidth { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NumberLock

Declaration
public static bool NumberLock { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Out

Set to by default.

Declaration
public static TextWriter Out { get; set; }
Property Value
Type Description
TextWriter
| Improve this Doc View Source

OutputEncoding

Declaration
public static Encoding OutputEncoding { get; set; }
Property Value
Type Description
Encoding
| Improve this Doc View Source

Title

Declaration
public static string Title { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

TreatControlCAsInput

Declaration
public static bool TreatControlCAsInput { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

WindowHeight

Declaration
public static int WindowHeight { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

WindowLeft

Declaration
public static int WindowLeft { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

WindowTop

Declaration
public static int WindowTop { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

WindowWidth

Declaration
public static int WindowWidth { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AtBottomLog(String, Boolean)

Keeps str at the bottom of your console.

Declaration
public static void AtBottomLog(string str, bool clearPrevious = false)
Parameters
Type Name Description
System.String str

The string to keep at the bottom of your console. Less than the width of your console.

System.Boolean clearPrevious

If you want to overwrite the previous bottom message.

| Improve this Doc View Source

Beep()

Declaration
public static void Beep()
| Improve this Doc View Source

Beep(Int32, Int32)

Declaration
public static void Beep(int frequency, int duration)
Parameters
Type Name Description
System.Int32 frequency
System.Int32 duration
| Improve this Doc View Source

Clear()

Declaration
public static void Clear()
| Improve this Doc View Source

ClearLastLine()

Declaration
public static void ClearLastLine()
| Improve this Doc View Source

Debug(Object)

Logs the value using the Debug MessageType.

Declaration
public static void Debug(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

Error(Object)

Logs the value using the Error MessageType.

Declaration
public static void Error(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

Exception(Exception)

Logs an exception with Error with it's StackTrace if it isn't null.

Declaration
public static void Exception(Exception exception)
Parameters
Type Name Description
Exception exception
| Improve this Doc View Source

GetCursorPosition()

Declaration
public static (int Left, int Top) GetCursorPosition()
Returns
Type Description
System.ValueTuple<System.Int32, System.Int32>
| Improve this Doc View Source

GetStyled(String, ConsoleStyleOption)

Declaration
public static string GetStyled(string str, ConsoleStyleOption style)
Parameters
Type Name Description
System.String str
ConsoleStyleOption style
Returns
Type Description
System.String
| Improve this Doc View Source

Info(Object)

Logs the value using the Info MessageType.

Declaration
public static void Info(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

Log(LogType, Object)

Declaration
public static void Log(LogType logType, object value)
Parameters
Type Name Description
LogType logType
System.Object value
| Improve this Doc View Source

Log(MessageType, Object, LogInfoContext)

Declaration
public static void Log(MessageType msgType, object value, LogInfoContext context = null)
Parameters
Type Name Description
MessageType msgType
System.Object value
LogInfoContext context
| Improve this Doc View Source

Log(Object)

Declaration
public static void Log(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

ObjectXml(LogType, Object)

Logs the obj serialized as XML using the matching MessageType for the logType.

Declaration
public static void ObjectXml(LogType logType, object obj)
Parameters
Type Name Description
LogType logType
System.Object obj
| Improve this Doc View Source

ObjectXml(MessageType, Object)

Logs the obj serialized as XML using the specified MessageType.

Declaration
public static void ObjectXml(MessageType msgType, object obj)
Parameters
Type Name Description
MessageType msgType
System.Object obj
| Improve this Doc View Source

ObjectXml(Object)

Logs the obj serialized as XML using the Info MessageType.

Declaration
public static void ObjectXml(object obj)
Parameters
Type Name Description
System.Object obj
| Improve this Doc View Source

Read()

Declaration
public static int Read()
Returns
Type Description
System.Int32
| Improve this Doc View Source

ReadLine()

Declaration
public static string ReadLine()
Returns
Type Description
System.String
| Improve this Doc View Source

ResetColor()

Declaration
public static void ResetColor()
| Improve this Doc View Source

SetBufferSize(Int32, Int32)

Declaration
public static void SetBufferSize(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height
| Improve this Doc View Source

SetCursorPosition(Int32, Int32)

Declaration
public static void SetCursorPosition(int left, int top)
Parameters
Type Name Description
System.Int32 left
System.Int32 top
| Improve this Doc View Source

SetCursorPosition((Int32, Int32))

Declaration
public static void SetCursorPosition((int, int) position)
Parameters
Type Name Description
System.ValueTuple<System.Int32, System.Int32> position
| Improve this Doc View Source

SetError(TextWriter)

Declaration
public static void SetError(TextWriter textWriter)
Parameters
Type Name Description
TextWriter textWriter
| Improve this Doc View Source

SetIn(TextReader)

Declaration
public static void SetIn(TextReader textReader)
Parameters
Type Name Description
TextReader textReader
| Improve this Doc View Source

SetOut(TextWriter)

Declaration
public static void SetOut(TextWriter textWriter)
Parameters
Type Name Description
TextWriter textWriter
| Improve this Doc View Source

SetWindowSize(Int32, Int32)

Declaration
public static void SetWindowSize(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height
| Improve this Doc View Source

StopwatchTask(Func<Task>, Action<Int64>)

Invokes finished after the Task(String, Task) returned by code has finished.

Declaration
public static async Task StopwatchTask(Func<Task> code, Action<long> finished)
Parameters
Type Name Description
Func<Task> code

The Task(String, Task) to be timed.

Action<System.Int64> finished
Returns
Type Description
Task
| Improve this Doc View Source

Task(String, Task)

Declaration
public static void Task(string name, Task task)
Parameters
Type Name Description
System.String name
Task task
| Improve this Doc View Source

Warn(Object)

Logs the value using the Warn MessageType.

Declaration
public static void Warn(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

Write(Object)

Declaration
public static void Write(object value)
Parameters
Type Name Description
System.Object value
| Improve this Doc View Source

WriteLine()

Logs a newline.

Declaration
public static void WriteLine()
| Improve this Doc View Source

WriteLine(Object)

Logs the value using the Info MessageType.

Declaration
public static void WriteLine(object value)
Parameters
Type Name Description
System.Object value

Events

| Improve this Doc View Source

CancelKeyPress

Declaration
public static event ConsoleCancelEventHandler? CancelKeyPress
Event Type
Type Description
System.Nullable<ConsoleCancelEventHandler>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX