在Async任务中执行活动

时间:2014-04-10 09:40:51

标签: c# .net workflow-foundation-4 workflow-foundation workflow-activity

实施AsyncCodeActivity。在BeginExecute内部,我想创建一个新任务,并在该任务中执行CodeActivity。像这样:

public class Working : AsyncCodeActivity
{
public NativeActivity nativeAct = new NativeActiv....

protected override IAsyncResult BeginExecute(AsyAsyncCodeActivityContext c, AsyncCallback c, object s)
{    
    Task executeTask = Task.Factory.StartNew(  
        /* THIS IS MY QUESTION - how do I execute "nativeAct" here? Something like nativeAct.execute(), but it won't let me do that */
    );    
}
}

0 个答案:

没有答案