C# Class PowerArgs.Cli.CliHelper

A class that provides a framework for building interactive command line interfaces.
Show file Open project: adamabdelhamed/PowerArgs Class Usage Examples

Public Methods

Method Description
CliHelper ( ) : System

Creates a new CLI object.

IsUserSure ( ConsoleString about ) : bool

Asks the user if they are sure about performing some operation and returns true if they indicate yes and false if they indicate no.

IsUserSure ( string about ) : bool

Asks the user if they are sure about performing some operation and returns true if they indicate yes and false if they indicate no.

Prompt ( ConsoleString message ) : string

Prompts the user to select a value from a set of options.

Prompt ( string message ) : string

Prompts the user to select a value from a set of options.

PromptForLine ( string message ) : string

Prompts the user for a line of input with the given message

Method Details

CliHelper() public method

Creates a new CLI object.
public CliHelper ( ) : System
return System

IsUserSure() public method

Asks the user if they are sure about performing some operation and returns true if they indicate yes and false if they indicate no.
public IsUserSure ( ConsoleString about ) : bool
about ConsoleString The message to display. 'Are you sure?' will be apended.
return bool

IsUserSure() public method

Asks the user if they are sure about performing some operation and returns true if they indicate yes and false if they indicate no.
public IsUserSure ( string about ) : bool
about string The message to display. 'Are you sure?' will be apended.
return bool

Prompt() public method

Prompts the user to select a value from a set of options.
public Prompt ( ConsoleString message ) : string
message ConsoleString the prompt message
return string

Prompt() public method

Prompts the user to select a value from a set of options.
public Prompt ( string message ) : string
message string the prompt message
return string

PromptForLine() public method

Prompts the user for a line of input with the given message
public PromptForLine ( string message ) : string
message string the prompt message
return string