Skip to the content.

PromptPlus API:PromptPlus

Build Publish License NuGet Downloads

Back to List Api

PromptPlus

Namespace: PPlus

Represents main class with all controls, methods, properties and extensions for PromptPlus.

public static class PromptPlus

Inheritance ObjectPromptPlus

Properties

BackgroundColor

Get/set BackgroundColor console with color.

public static ConsoleColor BackgroundColor { get; set; }

Property Value

ConsoleColor

BufferHeight

Gets the height of the buffer area.

public static int BufferHeight { get; }

Property Value

Int32

BufferWidth

Gets the width of the buffer area.

public static int BufferWidth { get; }

Property Value

Int32

CodePage

Get output CodePage.

public static int CodePage { get; }

Property Value

Int32

ColorDepth

Get Color capacity.ColorSystem

public static ColorSystem ColorDepth { get; }

Property Value

ColorSystem

Config

Get global properties for all controls.

public static ConfigControls Config { get; }

Property Value

ConfigControls

CurrentTargetBuffer

Get the Current Target Buffer

public static TargetBuffer CurrentTargetBuffer { get; }

Property Value

TargetBuffer

CursorLeft

Gets or sets a value column position of the cursor within the buffer area.

public static int CursorLeft { get; set; }

Property Value

Int32

CursorTop

Gets or set the row position of the cursor within the buffer area.

public static int CursorTop { get; set; }

Property Value

Int32

CursorVisible

Gets or sets a value indicating whether the cursor is visible.

public static bool CursorVisible { get; set; }

Property Value

Boolean

Error

Get standard error stream.

public static TextWriter Error { get; }

Property Value

TextWriter

ExtraExceptionInfo

Get/set extra console exception info

public static bool ExtraExceptionInfo { get; set; }

Property Value

Boolean

ForegroundColor

Get/Set Foreground console with color.

public static ConsoleColor ForegroundColor { get; set; }

Property Value

ConsoleColor

IgnoreColorTokens

Get/set Accept malformed color token
When the value is true and the color tokens is ignored

public static bool IgnoreColorTokens { get; set; }

Property Value

Boolean

In

Get standard input stream.

public static TextReader In { get; }

Property Value

TextReader

InputEncoding

Get/set an encoding for standard input stream.

public static Encoding InputEncoding { get; }

Property Value

Encoding

IsErrorRedirected

Gets a value that indicates whether error has been redirected from the standard error stream.

public static bool IsErrorRedirected { get; }

Property Value

Boolean

IsInputRedirected

Gets a value that indicates whether input has been redirected from the standard input stream.

public static bool IsInputRedirected { get; }

Property Value

Boolean

IsLegacy

Get the current Console drive Is Legcy.

public static bool IsLegacy { get; }

Property Value

Boolean

IsOutputRedirected

Gets a value that indicates whether output has been redirected from the standard output stream.

public static bool IsOutputRedirected { get; }

Property Value

Boolean

IsTerminal

Get Terminal mode.

public static bool IsTerminal { get; }

Property Value

Boolean

IsUnicodeSupported

Get Unicode Supported.

public static bool IsUnicodeSupported { get; }

Property Value

Boolean

KeyAvailable

Gets a value indicating whether a key press is available in the input stream.

public static bool KeyAvailable { get; }

Property Value

Boolean

Out

Get standard output stream.

public static TextWriter Out { get; }

Property Value

TextWriter

OutputEncoding

Get/set an encoding for standard output stream.

public static Encoding OutputEncoding { get; set; }

Property Value

Encoding

OverflowStrategy

Get write Overflow Strategy.

public static Overflow OverflowStrategy { get; }

Property Value

Overflow

PadLeft

Get screen margin left

public static byte PadLeft { get; }

Property Value

Byte

PadRight

Get screen margin right

public static byte PadRight { get; }

Property Value

Byte

Provider

Get provider mode.

public static string Provider { get; }

Property Value

String

StyleSchema

Get global Style-Schema for all controls.

public static StyleSchema StyleSchema { get; }

Property Value

StyleSchema

SupportsAnsi

Get localSupportsAnsi mode.

public static bool SupportsAnsi { get; }

Property Value

Boolean

Methods

AcceptColorTokens()

Create context to Accept color tokens
The output text will Accept Color Tokens until the ‘dispose’ is done.

public static IDisposable AcceptColorTokens()

Returns

IDisposable

AddtoList(String, String)

Create Add to List Control.

public static IControlList AddtoList(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlList

AddtoList(String, String, Action<IPromptConfig>)

Create Add to List Control.

public static IControlList AddtoList(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlList

AddtoList(String, Action<IPromptConfig>)

Create Add to List Control.

public static IControlList AddtoList(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlList

AddtoMaskEditList(String, String)

Create Add to MaskEdit List Control.

public static IControlMaskEditList AddtoMaskEditList(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlMaskEditList

AddtoMaskEditList(String, String, Action<IPromptConfig>)

Create Add to MaskEdit List Control.

public static IControlMaskEditList AddtoMaskEditList(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMaskEditList

AddtoMaskEditList(String, Action<IPromptConfig>)

Create Add to MaskEdit List Control.

public static IControlMaskEditList AddtoMaskEditList(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMaskEditList

AutoComplete(String, Action<IPromptConfig>)

Create Auto Complete Control.

public static IControlAutoComplete AutoComplete(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlAutoComplete

AutoComplete(String, String, Action<IPromptConfig>)

Create Auto Complete Control.

public static IControlAutoComplete AutoComplete(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlAutoComplete

Banner(String)

Create Banner Control to Write to console AsciiArt(FIGlet).

public static IBannerControl Banner(string value)

Parameters

value String
The text to write

Returns

IBannerControl

Beep()

Plays the sound of a beep through the console speaker.

public static void Beep()

Browser(String, String)

Create Browser Control.

public static IControlBrowserSelect Browser(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlBrowserSelect

Browser(String, String, Action<IPromptConfig>)

Create Browser Control.

public static IControlBrowserSelect Browser(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlBrowserSelect

Browser(String, Action<IPromptConfig>)

Create Browser Control.

public static IControlBrowserSelect Browser(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlBrowserSelect

BrowserMultiSelect(String, String)

Create MultiSelect Browser Control.

public static IControlBrowserMultiSelect BrowserMultiSelect(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlBrowserMultiSelect

BrowserMultiSelect(String, String, Action<IPromptConfig>)

Create MultiSelect Browser Control.

public static IControlBrowserMultiSelect BrowserMultiSelect(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlBrowserMultiSelect

BrowserMultiSelect(String, Action<IPromptConfig>)

Create MultiSelect Browser Control.

public static IControlBrowserMultiSelect BrowserMultiSelect(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlBrowserMultiSelect

Calendar(String, Action<IPromptConfig>)

Create Calendar Control to Write to console.

public static IControlCalendar Calendar(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to chart

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlCalendar

Calendar(String, String)

Create Calendar Control to Write to console.

public static IControlCalendar Calendar(string prompt, string description)

Parameters

prompt String
The prompt text to chart

description String
The description text to chart

Returns

IControlCalendar

Calendar(String, String, Action<IPromptConfig>)

Create Calendar Control to Write to console.

public static IControlCalendar Calendar(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to chart

description String
The description text to chart

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlCalendar

ChartBar(String, Action<IPromptConfig>)

Create ChartBar Control to Write to console.

public static IControlChartBar ChartBar(string title, Action<IPromptConfig> config)

Parameters

title String
The title text to chart

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlChartBar

ChartBar(String, String)

Create ChartBar Control to Write to console.

public static IControlChartBar ChartBar(string title, string description)

Parameters

title String
The title text to chart

description String
The description text to chart

Returns

IControlChartBar

ChartBar(String, String, Action<IPromptConfig>)

Create ChartBar Control to Write to console.

public static IControlChartBar ChartBar(string title, string description, Action<IPromptConfig> config)

Parameters

title String
The prompt text to chart

description String
The description text to chart

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlChartBar

Clear()

Clears the console buffer and corresponding console window of display information.
Move cursor fom top console.

public static void Clear()

Clear(Nullable<Color>)

Clears the console buffer with Color and set BackgroundColor with Color

public static void Clear(Nullable<Color> backcolor)

Parameters

backcolor Nullable<Color>
The Color Background

ClearLine(Nullable<Int32>)

Clear line

public static void ClearLine(Nullable<Int32> row)

Parameters

row Nullable<Int32>
The row to clear

ClearRestOfLine()

Clear rest of current line

public static void ClearRestOfLine()

Confirm(String, Action<IPromptConfig>)

Create Confirm control in yes/no mode.
Yes/No texts come from resources

public static IControlKeyPress Confirm(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlKeyPress

Confirm(String, String, Action<IPromptConfig>)

Create Confirm control in yes/no mode.
Yes/No texts come from resources

public static IControlKeyPress Confirm(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlKeyPress

Confirm(String, ConsoleKey, ConsoleKey, String, Action<IPromptConfig>)

Create Confirm control in yes/no mode.

public static IControlKeyPress Confirm(string prompt, ConsoleKey opcyes, ConsoleKey opcno, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

opcyes ConsoleKey
yes key.

opcno ConsoleKey
no key

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlKeyPress

DefaultColor(Color, Color)

Set ForegroundColor/BackgroundColor Console

public static void DefaultColor(Color forecorlor, Color background)

Parameters

forecorlor Color
The Color ForegroundColor

background Color
The Color BackgroundColor

DoubleDash(String, DashOptions, Int32, Nullable<Style>)

Writes text line representation whie colors in a pair of lines of dashes.

public static int DoubleDash(string value, DashOptions dashOptions, int extralines, Nullable<Style> style)

Parameters

value String
The value to write.

dashOptions DashOptions
DashOptions character

extralines Int32
Number lines to write after write value

style Nullable<Style>
The Style to write.

Returns

Number of lines write on console

EscapeColorTokens()

Create context to ignore color tokens
The output text will ignore the color tokens until the ‘dispose’ is done.

public static IDisposable EscapeColorTokens()

Returns

IDisposable

GetCursorPosition()

Gets the position of the cursor.

public static ValueTuple<Int32, Int32> GetCursorPosition()

Returns

The column and row position of the cursor.

Input(String, Action<IPromptConfig>)

Create Input Control.

public static IControlInput Input(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlInput

Input(String, String, Action<IPromptConfig>)

Create Input Control.

public static IControlInput Input(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlInput

Join()

Start Join Commands

public static IJointConsole Join()

Returns

IJointConsole

KeyPress()

Create Keypress Control to wait a any key input.

public static IControlKeyPress KeyPress()

Returns

IControlKeyPress

KeyPress(String, Action<IPromptConfig>)

Create Keypress Control to wait a any key input.

public static IControlKeyPress KeyPress(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlKeyPress

KeyPress(String, String, Action<IPromptConfig>)

Create Keypress Control to wait a any key input.

public static IControlKeyPress KeyPress(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlKeyPress

MaskEdit(String, Action<IPromptConfig>)

Create MaskEdit Control.

public static IControlMaskEdit MaskEdit(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMaskEdit

MaskEdit(String, String, Action<IPromptConfig>)

Create MaskEdit Control.

public static IControlMaskEdit MaskEdit(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMaskEdit

MoveCursor(CursorDirection, Int32)

Moves the cursor relative to the current position.

public static void MoveCursor(CursorDirection direction, int steps)

Parameters

direction CursorDirection
The direction to move the cursor.

steps Int32
The number of steps to move the cursor.

MultiSelect<T>(String, Action<IPromptConfig>)

Create MultiSelect Control.

public static IControlMultiSelect<T> MultiSelect<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMultiSelect<T>

MultiSelect<T>(String, String)

Create MultiSelect Control.

public static IControlMultiSelect<T> MultiSelect<T>(string prompt, string description)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlMultiSelect<T>

MultiSelect<T>(String, String, Action<IPromptConfig>)

Create MultiSelect Control.

public static IControlMultiSelect<T> MultiSelect<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlMultiSelect<T>

OutputError()

Create context to write on standard error output stream for any output included until the ‘dispose’ is done.

public static IDisposable OutputError()

Returns

IDisposable

ProgressBar(String, String)

Create Progress Bar Control

public static IControlProgressBar<Object> ProgressBar(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlProgressBar<T>

ProgressBar<T>(ProgressBarType, String, T, String)

Create Progress Bar Control

public static IControlProgressBar<T> ProgressBar<T>(ProgressBarType barType, string prompt, T defaultresult, string description)

Type Parameters

T
Typeof return

Parameters

barType ProgressBarType
The type Progress Bar. ProgressBarType

prompt String
The prompt text to write

defaultresult T
The instance result

description String
The description text to write

Returns

IControlProgressBar<T>

ProgressBar<T>(ProgressBarType, String, T, String, Action<IPromptConfig>)

Create instance Progress Bar Control

public static IControlProgressBar<T> ProgressBar<T>(ProgressBarType barType, string prompt, T defaultresult, string description, Action<IPromptConfig> config)

Type Parameters

T
Typeof return

Parameters

barType ProgressBarType
The type Progress Bar. ProgressBarType

prompt String
The prompt text to write

defaultresult T
The starting value for the result

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlProgressBar<T>

ReadKey(Boolean)

Obtains the next character or function key pressed by the user.

public static ConsoleKeyInfo ReadKey(bool intercept)

Parameters

intercept Boolean
Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false.

Returns


An oject that describes the System.ConsoleKey constant and Unicode character,
if any, that correspond to the pressed console key. The System.ConsoleKeyInfo
t also describes, in a bitwise combination of System.ConsoleModifiers values,
er one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously
with the console key.

ReadLine()


Read the line from stream. A line is defined as a sequence of characters followed by
a car return (‘\r’), a line feed (‘\n’), or a carriage return
immedy followed by a line feed. The resulting string does not
contain the terminating carriage return and/or line feed.

public static string ReadLine()

Returns

The returned value is null if the end of the input stream has been reached.

ReadLineWithEmacs(Nullable<UInt32>, CaseOptions, Action<String, Int32>)


Read the line from stream using Emacs keyboard shortcuts. A line is defined as a sequence of characters followed by
a car return (‘\r’), a line feed (‘\n’), or a carriage return
immedy followed by a line feed. The resulting string does not
contain the terminating carriage return and/or line feed.

public static string ReadLineWithEmacs(Nullable<UInt32> maxlength, CaseOptions caseOptions, Action<String, Int32> afteraccept)

Parameters

maxlength Nullable<UInt32>
The input Max-length

caseOptions CaseOptions
The input CaseOptions

afteraccept Action<String, Int32>
The user action after each accepted keystroke. Firt param is input text, Second param is relative cursor position of text

Returns

The string input value.

Reset()

Reset all config and properties to default values

public static void Reset()

ResetColor()

Reset colors to default values.

public static void ResetColor()

RunOnBuffer(TargetBuffer, Action<CancellationToken>, Nullable<ConsoleColor>, Nullable<ConsoleColor>, Nullable<CancellationToken>)

Run custom action on Target Buffer

public static bool RunOnBuffer(TargetBuffer value, Action<CancellationToken> customaction, Nullable<ConsoleColor> defaultforecolor, Nullable<ConsoleColor> defaultbackcolor, Nullable<CancellationToken> cancellationToken)

Parameters

value TargetBuffer

customaction Action<CancellationToken>

defaultforecolor Nullable<ConsoleColor>

defaultbackcolor Nullable<ConsoleColor>

cancellationToken Nullable<CancellationToken>

Returns

Boolean

Select<T>(String, Action<IPromptConfig>)

Create Select Control.

public static IControlSelect<T> Select<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T
Typeof T

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlSelect<T>

Select<T>(String, String)

Create Select Control.

public static IControlSelect<T> Select<T>(string prompt, string description)

Type Parameters

T
Typeof T

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlSelect<T>

Select<T>(String, String, Action<IPromptConfig>)

Create Select Control.

public static IControlSelect<T> Select<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T
Typeof T

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlSelect<T>

SetCursorPosition(Int32, Int32)

Sets the position of the cursor.

public static void SetCursorPosition(int left, int top)

Parameters

left Int32
The column position of the cursor. Columns are numbered from left to right starting at 0.

top Int32
The row position of the cursor. Rows are numbered from top to bottom starting at 0.

SetError(TextWriter)

set standard error stream.

public static void SetError(TextWriter value)

Parameters

value TextWriter
A stream that is the new standard error.

SetIn(TextReader)

set standard input stream.

public static void SetIn(TextReader value)

Parameters

value TextReader
A stream that is the new standard input.

SetOut(TextWriter)

set standard output stream.

public static void SetOut(TextWriter value)

Parameters

value TextWriter
A stream that is the new standard output.

Setup(Action<ProfileSetup>)

Overwrite current console with new console profile.

public static void Setup(Action<ProfileSetup> config)

Parameters

config Action<ProfileSetup>
Action with ProfileSetup to configuration

SingleDash(String, DashOptions, Int32, Nullable<Style>)

Writes text line representation whie colors and Write single dash after.

public static int SingleDash(string value, DashOptions dashOptions, int extralines, Nullable<Style> style)

Parameters

value String
The value to write.

dashOptions DashOptions
DashOptions character

extralines Int32
Number lines to write after write value

style Nullable<Style>
The Style to write.

Returns

Number of lines write on console

SliderNumber(String, Action<IPromptConfig>)

Create Slider Number Control.

public static IControlSliderNumber SliderNumber(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The description text to write

Returns

IControlSliderNumber

SliderNumber(String, String, Action<IPromptConfig>)

Create Slider Number Control.

public static IControlSliderNumber SliderNumber(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlSliderNumber

SliderSwitch(String, Action<IPromptConfig>)

Create Slider Switch on/off Control.

public static IControlSliderSwitch SliderSwitch(string prompt, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlSliderSwitch

SliderSwitch(String, String, Action<IPromptConfig>)

Create Slider Switch on/off Control.

public static IControlSliderSwitch SliderSwitch(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlSliderSwitch

SwapBuffer(TargetBuffer)

Swap Target Buffer

public static bool SwapBuffer(TargetBuffer value)

Parameters

value TargetBuffer

Returns

Boolean

Table<T>(String, Action<IPromptConfig>)

Write Table in console.

public static IControlTable<T> Table<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTable<T>

Table<T>(String, String)

Write Table in console.

public static IControlTable<T> Table<T>(string prompt, string description)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlTable<T>

Table<T>(String, String, Action<IPromptConfig>)

Write Table in console.

public static IControlTable<T> Table<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTable<T>

TableMultiSelect<T>(String, Action<IPromptConfig>)

Create Table MultiSelect Control.

public static IControlTableMultiSelect<T> TableMultiSelect<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTableMultiSelect<T>

TableMultiSelect<T>(String, String)

Create Table MultiSelect Control.

public static IControlTableMultiSelect<T> TableMultiSelect<T>(string prompt, string description)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlTableMultiSelect<T>

TableMultiSelect<T>(String, String, Action<IPromptConfig>)

Create Table MultiSelect Control to Write to console.

public static IControlTableMultiSelect<T> TableMultiSelect<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTableMultiSelect<T>

TableSelect<T>(String, Action<IPromptConfig>)

Create Table Select Control.

public static IControlTableSelect<T> TableSelect<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTableSelect<T>

TableSelect<T>(String, String)

Create Table Select Control.

public static IControlTableSelect<T> TableSelect<T>(string prompt, string description)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlTableSelect<T>

TableSelect<T>(String, String, Action<IPromptConfig>)

Create Table Select Control.

public static IControlTableSelect<T> TableSelect<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T
type of data to table

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTableSelect<T>

TreeView<T>(String, String)

Create TreeView Control.

public static IControlTreeViewSelect<T> TreeView<T>(string prompt, string description)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlTreeViewSelect<T>

TreeView<T>(String, String, Action<IPromptConfig>)

Create TreeView Control.

public static IControlTreeViewSelect<T> TreeView<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTreeViewSelect<T>

TreeView<T>(String, Action<IPromptConfig>)

Create TreeView Control.

public static IControlTreeViewSelect<T> TreeView<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTreeViewSelect<T>

TreeViewMultiSelect<T>(String, String)

Create TreeView MultiSelect Control.

public static IControlTreeViewMultiSelect<T> TreeViewMultiSelect<T>(string prompt, string description)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlTreeViewMultiSelect<T>

TreeViewMultiSelect<T>(String, String, Action<IPromptConfig>)

Create TreeView MultiSelect Control.

public static IControlTreeViewMultiSelect<T> TreeViewMultiSelect<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTreeViewMultiSelect<T>

TreeViewMultiSelect<T>(String, Action<IPromptConfig>)

Create TreeView MultiSelect Control.

public static IControlTreeViewMultiSelect<T> TreeViewMultiSelect<T>(string prompt, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlTreeViewMultiSelect<T>

WaitKeypress(Boolean, Nullable<CancellationToken>)

Wait Keypress from standard input stream

public static Nullable<ConsoleKeyInfo> WaitKeypress(bool intercept, Nullable<CancellationToken> cancellationToken)

Parameters

intercept Boolean
Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false.

cancellationToken Nullable<CancellationToken>
The token to monitor for cancellation requests.

Returns


An oject that describes the System.ConsoleKey constant and Unicode character,
if any, that correspond to the pressed console key. The System.ConsoleKeyInfo
t also describes, in a bitwise combination of System.ConsoleModifiers values,
er one or more Shift, Alt, or Ctrl modifier keys was pressed simultaneously
with the console key.

WaitProcess<T>(String, String)

Create Wait Control

public static IControlWait<T> WaitProcess<T>(string prompt, string description)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlWait<T>

WaitProcess(String, String)

Create Wait Control

public static IControlWait<Object> WaitProcess(string prompt, string description)

Parameters

prompt String
The prompt text to write

description String
The description text to write

Returns

IControlWait<T>

WaitProcess<T>(String, String, Action<IPromptConfig>)

Create Wait Control

public static IControlWait<T> WaitProcess<T>(string prompt, string description, Action<IPromptConfig> config)

Type Parameters

T

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlWait<T>

WaitProcess(String, String, Action<IPromptConfig>)

Create Wait Control

public static IControlWait<Object> WaitProcess(string prompt, string description, Action<IPromptConfig> config)

Parameters

prompt String
The prompt text to write

description String
The description text to write

config Action<IPromptConfig>
The config action IPromptConfig

Returns

IControlWait<T>

WaitTimer(String, TimeSpan, SpinnersType, Boolean, Action<IPromptConfig>, Nullable<Style>, Nullable<Style>, Nullable<CancellationToken>)

Create Wait Control with step TimeSpan delay and run

public static void WaitTimer(string prompt, TimeSpan delay, SpinnersType spinnersType, bool showCountdown, Action<IPromptConfig> config, Nullable<Style> spinnerStyle, Nullable<Style> elapsedTimeStyle, Nullable<CancellationToken> cancellationToken)

Parameters

prompt String
The prompt text to write

delay TimeSpan
The delay process

spinnersType SpinnersType
The SpinnersType

showCountdown Boolean
True show Countdown, otherwise ‘no’

config Action<IPromptConfig>
The config action IPromptConfig

spinnerStyle Nullable<Style>
Style Spinner

elapsedTimeStyle Nullable<Style>
Style Countdown

cancellationToken Nullable<CancellationToken>
CancellationToken for control

Write(Exception, Nullable<Style>, Boolean)

Write a Exception to output console.

public static int Write(Exception value, Nullable<Style> style, bool clearrestofline)

Parameters

value Exception
Exception to write

style Nullable<Style>
Style of text

clearrestofline Boolean
Clear rest of line after write

Returns

Number of lines write on console

Write(String, Nullable<Style>, Boolean)

Write a text to output console.

public static int Write(string value, Nullable<Style> style, bool clearrestofline)

Parameters

value String
text to write

style Nullable<Style>
Style of text

clearrestofline Boolean
Clear rest of line after write

Returns

Number of lines write on console

WriteLine(Exception, Nullable<Style>, Boolean)

Write a exception to output console with line terminator.

public static int WriteLine(Exception value, Nullable<Style> style, bool clearrestofline)

Parameters

value Exception
Exception to write

style Nullable<Style>
Style of text

clearrestofline Boolean
Clear rest of line after write

Returns

Number of lines write on console

WriteLine(String, Nullable<Style>, Boolean)

Write a text to output console with line terminator.

public static int WriteLine(string value, Nullable<Style> style, bool clearrestofline)

Parameters

value String
text to write

style Nullable<Style>
Style of text

clearrestofline Boolean
Clear rest of line after write

Returns

Number of lines write on console

WriteLines(Int32)

Write lines with line terminator

public static void WriteLines(int steps)

Parameters

steps Int32
Numbers de lines.


Back to List Api