AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | List of all members
AlphaFramework.Presentation.Arguments Class Reference

An immutable class representing command-line arguments passed to an application. More...

Public Member Functions

override string ToString ()
 Returns the arguments stored in this instance. More...
 
 Arguments ([NotNull] string[] args)
 Creates a new arguments instance based on the argument array from a Main method. More...
 
bool Contains (string command)
 Determines whether a specific command is contained in the arguments. More...
 

Public Attributes

IEnumerable< string > Files => _files
 A list of all file names in the arguments. More...
 
IEnumerable< string > Commands => _commands.Keys
 A list of all commands without leading slash or hyphen in the arguments. More...
 
string this[[NotNull] string command => _commands[command]
 Gets the options for a specific command in the arguments. More...
 

Detailed Description

An immutable class representing command-line arguments passed to an application.

Constructor & Destructor Documentation

AlphaFramework.Presentation.Arguments.Arguments ( [NotNull] string[]  args)
inline

Creates a new arguments instance based on the argument array from a Main method.

Parameters
argsThe array of arguments.

Member Function Documentation

bool AlphaFramework.Presentation.Arguments.Contains ( string  command)

Determines whether a specific command is contained in the arguments.

Parameters
commandThe command to check for.
Returns
True if the command was set; false otherwise.
override string AlphaFramework.Presentation.Arguments.ToString ( )

Returns the arguments stored in this instance.

Member Data Documentation

string this[[NotNull] string AlphaFramework.Presentation.Arguments.command => _commands[command]

Gets the options for a specific command in the arguments.

Parameters
commandThe command to get the options for.
Returns
The options for command if any; null otherwise.
IEnumerable<string> AlphaFramework.Presentation.Arguments.Commands => _commands.Keys

A list of all commands without leading slash or hyphen in the arguments.

IEnumerable<string> AlphaFramework.Presentation.Arguments.Files => _files

A list of all file names in the arguments.


The documentation for this class was generated from the following file: