FlowSwitch<T>.Default Propriedade
Definição
O FlowNode a ser executado se nenhum elemento na coleção Cases corresponder ao resultado da avaliação do Expression.The FlowNode to be executed if no elements in the Cases collection match the result of the evaluation of the Expression.
public:
property System::Activities::Statements::FlowNode ^ Default { System::Activities::Statements::FlowNode ^ get(); void set(System::Activities::Statements::FlowNode ^ value); };
public System.Activities.Statements.FlowNode Default { get; set; }
member this.Default : System.Activities.Statements.FlowNode with get, set
Public Property Default As FlowNode
Valor da propriedade
O padrão FlowNode a ser executado.The default FlowNode to execute.
Exemplos
O exemplo de código a seguir demonstra a definição da propriedade padrão de um FlowSwitch<T> nó.The following code sample demonstrates setting the Default property of a FlowSwitch<T> node. Este exemplo é do tratamento de falhas em uma atividade de fluxograma usando a amostra TryCatch .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
};