예제 #1
0
 /// <summary>
 /// Handles the completion of the specified <see cref="IWorkflowActivityProcessor"/>
 /// </summary>
 /// <param name="processor">The <see cref="IWorkflowActivityProcessor"/> to handle the completion of</param>
 /// <returns>A new awaitable <see cref="Task"/></returns>
 protected virtual async Task OnActivityProcessingCompletedAsync(IWorkflowActivityProcessor processor)
 {
     this.Processors.TryRemove(processor);
     processor.Dispose();
     foreach (IWorkflowActivityProcessor childProcessor in this.Processors)
     {
         await childProcessor.ProcessAsync(this.CancellationToken);
     }
 }
 /// <summary>
 /// Handles the completion of the specified <see cref="IWorkflowActivityProcessor"/>
 /// </summary>
 /// <param name="processor">The <see cref="IWorkflowActivityProcessor"/> to handle the completion of</param>
 /// <param name="cancellationToken">A <see cref="CancellationToken"/></param>
 /// <returns>A new awaitable <see cref="Task"/></returns>
 protected virtual Task OnTriggerCompletedAsync(IWorkflowActivityProcessor processor, CancellationToken cancellationToken)
 {
     this.Processors.TryRemove(processor);
     processor.Dispose();
     return(Task.CompletedTask);
 }