Parallel Конструктор

Определение

Создает новый экземпляр действия Parallel.

public:
 Parallel();
public Parallel ();
Public Sub New ()

Примеры

В следующем образце кода показано создание действия Parallel.

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.." },
            }
        },

Применяется к