Muokkaa

Jaa


DirectiveCollection Class

Definition

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

Remarks

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>).

Constructors

DirectiveCollection()

Methods

Contains(String)

Gets a value determining whether a directive with the specified name was parsed.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an enumerator that iterates through the collection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryGetValues(String, IReadOnlyList<String>)

Gets the values specified for a given directive. A return value indicates whether the specified directive name was present.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Applies to