Created
June 3, 2021 16:08
-
-
Save neuecc/963437866781034e595e216df2ea781c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// keyless-sync | |
public interface IPublisher<TMessage> | |
{ | |
void Publish(TMessage message); | |
} | |
| |
public interface ISubscriber<TMessage> | |
{ | |
IDisposable Subscribe(IMessageHandler<TMessage> handler, params MessageHandlerFilter<TMessage>[] filters); | |
} | |
| |
// keyless-async | |
public interface IAsyncPublisher<TMessage> | |
{ | |
ValueTask PublishAsync(TMessage message, AsyncPublishStrategy publishStrategy, CancellationToken cancellationToken = default(CancellationToken)); | |
} | |
| |
public interface IAsyncSubscriber<TMessage> | |
{ | |
IDisposable Subscribe(IAsyncMessageHandler<TMessage> asyncHandler, params AsyncMessageHandlerFilter<TMessage>[] filters); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment