DirectiveCollection Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A collection of directives parsed from a command line.
public ref class DirectiveCollection : System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::Collections::Generic::IEnumerable<System::String ^> ^>>
public class DirectiveCollection : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,System.Collections.Generic.IEnumerable<string>>>
type DirectiveCollection = class
interface seq<KeyValuePair<string, seq<string>>>
interface IEnumerable
Public Class DirectiveCollection
Implements IEnumerable(Of KeyValuePair(Of String, IEnumerable(Of String)))
- Inheritance
-
DirectiveCollection
- Implements
A directive is specified on the command line using square brackets, containing no spaces and preceding other tokens unless they are also directives. In the following example, two directives are present, directive-one
and directive-two
: > myapp [directive-one] [directive-two:value] arg1 arg2
The second has a value specified as well, value
. Directive values can be read by calling using TryGetValues(String, IReadOnlyList<String>).
Contains(String) |
Gets a value determining whether a directive with the specified name was parsed. |
Get |
Returns an enumerator that iterates through the collection. |
Try |
Gets the values specified for a given directive. A return value indicates whether the specified directive name was present. |
IEnumerable. |
Returns an enumerator that iterates through a collection. |
Product | Versions |
---|---|
System.CommandLine | 2.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: