Created
June 25, 2020 16:54
-
-
Save tonysneed/9e1425bc95754ba41c87380d43a462b9 to your computer and use it in GitHub Desktop.
EventProcessor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class EventProcessor<TSourceEvent, TSinkEvent> : EventProcessorBase, IEventProcessor | |
{ | |
protected readonly IEventConsumer<TSourceEvent> consumer; | |
protected readonly IEventProducer<TSinkEvent> producer; | |
public EventProcessor( | |
IEventConsumer<TSourceEvent> consumer, | |
IEventProducer<TSinkEvent> producer, | |
params IMessageHandler[] handlers) | |
: base(handlers) | |
{ | |
this.consumer = consumer; | |
this.producer = producer; | |
} | |
public abstract Task Process(CancellationToken cancellationToken = default); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment