Class Arguments
- Namespace
- AlphaFramework.Presentation
- Assembly
- AlphaFramework.Presentation.dll
An immutable class representing command-line arguments passed to an application.
public class Arguments
- Inheritance
-
Arguments
- Inherited Members
- Extension Methods
Constructors
Arguments(string[])
Creates a new arguments instance based on the argument array from a Main method.
public Arguments(string[] args)
Parameters
args
string[]The array of arguments.
Properties
Commands
A list of all commands without leading slash or hyphen in the arguments.
public IEnumerable<string> Commands { get; }
Property Value
Files
A list of all file names in the arguments.
public IEnumerable<string> Files { get; }
Property Value
this[string]
Gets the options for a specific command in the arguments.
public string? this[string command] { get; }
Parameters
command
stringThe command to get the options for.
Property Value
- string
The options for
command
if any; null otherwise.
Methods
Contains(string)
Determines whether a specific command is contained in the arguments.
public bool Contains(string command)
Parameters
command
stringThe command to check for.
Returns
- bool
True if the command was set; false otherwise.
ToString()
Returns the arguments stored in this instance.
public override string ToString()