DirectiveCollection 類別

定義

從命令列剖析的指示詞集合。

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)))
繼承
DirectiveCollection
實作

備註

指示詞是使用方括弧在命令列上指定,除非它們也是指示詞,否則不會包含空格和其他標記前面。 在下列範例中,有兩個指示詞存在, directive-one > myapp [directive-one] [directive-two:value] arg1 arg2directive-two 第二個指示詞也指定了值。 value 您可以使用 呼叫 TryGetValues(String, IReadOnlyList<String>) 來讀取指示詞值。

建構函式

DirectiveCollection()

從命令列剖析的指示詞集合。

方法

Contains(String)

取得值,判斷是否已剖析具有指定名稱的 指示詞。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEnumerator()

傳回逐一查看集合的列舉值。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
TryGetValues(String, IReadOnlyList<String>)

取得指定指示詞所指定的值。 傳回值表示指定的指示詞名稱是否存在。

明確介面實作

IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。

適用於