Parallel.CompletionCondition Eigenschap

Definitie

Evalueert nadat een vertakking is voltooid.

public:
 property System::Activities::Activity<bool> ^ CompletionCondition { System::Activities::Activity<bool> ^ get(); void set(System::Activities::Activity<bool> ^ value); };
[System.Windows.Markup.DependsOn("Variables")]
public System.Activities.Activity<bool> CompletionCondition { get; set; }
[<System.Windows.Markup.DependsOn("Variables")>]
member this.CompletionCondition : System.Activities.Activity<bool> with get, set
Public Property CompletionCondition As Activity(Of Boolean)

Waarde van eigenschap

De voltooiingsexpressie.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de eigenschap CompletionCondition van een Parallel activiteit instelt.

return new Parallel
{
    // Timeout from branch causes other branch to cancel.
    CompletionCondition = true,

    Branches =
    {
        // Delay Branch
        new Sequence
        {
            Activities =
            {
                new WriteLine { Text = "Branch1: Body is about to Delay 2secs transferring execution to Branch2" },
                new Delay
                {
                    Duration = TimeSpan.FromSeconds(2)
                },
                new WriteLine { Text = "Branch1: Body is about to complete causing Branch2 to cancel.." },
            }
        },

Opmerkingen

Als deze eigenschap wordt geƫvalueerd true, worden de andere geplande elementen in de Branches verzameling geannuleerd. Als deze eigenschap niet is ingesteld, worden alle Activity objecten in de Branches verzameling uitgevoerd totdat deze is voltooid.

Van toepassing op