FlowSwitch<T>.Cases FlowSwitch<T>.Cases FlowSwitch<T>.Cases FlowSwitch<T>.Cases Property


Gets a dictionary of cases to be processed by the FlowSwitch<T> element.

 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)

Property Value

The collection of cases.


The following code sample demonstrates setting the Cases property of a FlowSwitch<T> node. This example is from the Fault Handling in a Flowchart Activity Using TryCatch sample.

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


Each element in the dictionary consists of an object of the generic type specified in FlowSwitch<T> and a corresponding FlowNode to execute.

Applies to