csharp System.Activities.Statements.Parallel类(方法)实例源码

下面列出了csharp System.Activities.Statements.Parallel 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Activities.Statement   
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.." },
            }
        },


问题


面经


文章

微信
公众号

扫码关注公众号