IPipelineExecutionOrder IPipelineBuilder.NotifyAsync(Func <ICommunicationContext, Task <PipelineContinuation> > action)
        {
            var invocation = new ContributorInvocation(_contributor, action);

            _invocations.Add(invocation);
            return(new NotificationBuilder(_contributors, invocation));
        }
 public NotificationBuilder(IEnumerable <IPipelineContributor> contributors, ContributorInvocation invocation)
 {
     if (contributors == null)
     {
         throw new ArgumentNullException(nameof(contributors));
     }
     _invocation   = invocation;
     _contributors = contributors.ToList();
 }