Table of Contents

Interface ICommandLineArgument

Namespace
Ubiquity.CommandLineParsing
Assembly
Ubiquity.CommandlineParsing.dll

Interface for a command line argument.

public interface ICommandLineArgument
Extension Methods

Remarks

An argument is either positional or a switch/option. This interface provides the basic functionality required for either type, which is just a single property to get the text of the original input.

Properties

Text

Gets the full text of argument.

string Text { get; }

Property Value

string

Remarks

This is generally used for debugging and reporting errors to the user so that the actual full text of an invalid option is available to aid in clarity for the user.

For a switch/option the full text of the value includes the leading switch, the name of the option any value separator and the value. For positional arguments it includes the full string (without the outermost quotes, if any, to allow spaces, etc.. in the value).