Added Unsubscribe method
Clarified contribution license requirements in readme
This commit is contained in:
parent
d4cc061955
commit
c361af3b3c
@ -68,3 +68,6 @@ Master build (stable release)
|
||||
|
||||
Latest build
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti)
|
||||
|
||||
## Contributing
|
||||
By contributing to Tapeti's main repository (https://github.com/MvRens/Tapeti) you agree to dedicate your code-base contributions to the public domain under the Unlicense license.
|
@ -84,6 +84,12 @@ namespace Tapeti
|
||||
ISubscriber SubscribeSync(bool startConsuming = true);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Stops the current subscriber.
|
||||
/// </summary>
|
||||
Task Unsubscribe();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns an IPublisher implementation for the current connection.
|
||||
/// </summary>
|
||||
|
@ -80,6 +80,13 @@ namespace Tapeti
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task Unsubscribe()
|
||||
{
|
||||
return subscriber?.Stop() ?? Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
public IPublisher GetPublisher()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user