FlowSwitch<T>.Cases プロパティ

定義

FlowSwitch<T>要素によって処理されるケースのディクショナリを取得します。

public:
 property System::Collections::Generic::IDictionary<T, System::Activities::Statements::FlowNode ^> ^ Cases { System::Collections::Generic::IDictionary<T, System::Activities::Statements::FlowNode ^> ^ get(); };
public System.Collections.Generic.IDictionary<T,System.Activities.Statements.FlowNode> Cases { get; }
member this.Cases : System.Collections.Generic.IDictionary<'T, System.Activities.Statements.FlowNode>
Public ReadOnly Property Cases As IDictionary(Of T, FlowNode)

プロパティ値

ケースのコレクション。

次のコード サンプルは、 FlowSwitch<T> ノードの Cases プロパティの設定を示しています。 この例は、 TryCatch を使用したフローチャート アクティビティのエラー処理 のサンプルです。

FlowSwitch<string> promoCodeSwitch = new FlowSwitch<string>
{
    Expression = promo,
    Cases =
    {
       { "Single", singleStep },
       { "MNK", mnkStep },
       { "MWK", mwkStep }
    },
    Default = discountDefault
};

注釈

ディクショナリ内の各要素は、 FlowSwitch<T> で指定されたジェネリック型のオブジェクトと、実行する対応する FlowNode で構成されます。

適用対象