/// <inheritdoc /> public Task ProcessEventAsync( PipelineEvent pipelineEvent, IEventsScope eventsScope ) { var pipeline = _nextModule ?? (_nextModule = Build()); return(pipeline(new PipelineContext(pipelineEvent, eventsScope, _internalServiceProvider))); }
/// <summary> /// Creates a new instance of a <see cref="PipelineContext"/>. /// </summary> /// <param name="pipelineEvent">The event being processed.</param> /// <param name="eventsScope">The current events scope.</param> /// <param name="serviceProvider">The internal service provider.</param> public PipelineContext(PipelineEvent pipelineEvent, IEventsScope eventsScope, IServiceProvider serviceProvider) { PipelineEvent = pipelineEvent ?? throw new ArgumentNullException(nameof(pipelineEvent)); EventsScope = eventsScope ?? throw new ArgumentNullException(nameof(eventsScope)); ServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); }
public static void InvokingPipelineModule(this ILogger logger, Type pipelineModuleType, PipelineEvent pipelineEvent) => _invokingPipelineModule( logger, pipelineModuleType.Name, pipelineEvent.Event.GetType().Name, null );