public void SetResult() { if (syncContext != null) { syncContext.OperationCompleted(); } scope = null; task.Completion.SetResult(default(VoidTaskResult)); }
public void Start <TStateMachine> (ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine { scope = ActivityScopeRetriever <TStateMachine> .GetScopeFromStateMachine(ref stateMachine); if (scope == null) { throw new InvalidOperationException("An async method returning AsyncTask needs to have a valid parameter of type ActivityScope"); } stateMachine.MoveNext(); }
internal Runner(IAsyncStateMachine machine, ActivityScope scope) { this.machine = machine; this.scope = scope; }