FlowSwitch<T>.Cases Property
Definition
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.
Gets a dictionary of cases to be processed by the FlowSwitch<T> element.
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)
Property Value
The collection of cases.
Examples
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
};
Remarks
Each element in the dictionary consists of an object of the generic type specified in FlowSwitch<T> and a corresponding FlowNode to execute.