Add interceptor for unsubscriptions.

This commit is contained in:
Christian Kratky
2019-11-14 20:47:33 +01:00
parent 78b57531b6
commit 896e9ed0aa
8 changed files with 127 additions and 8 deletions
@@ -155,6 +155,12 @@ namespace MQTTnet.Server
return this;
}
public MqttServerOptionsBuilder WithUnsubscriptionInterceptor(IMqttServerUnsubscriptionInterceptor value)
{
_options.UnsubscriptionInterceptor = value;
return this;
}
public MqttServerOptionsBuilder WithSubscriptionInterceptor(Action<MqttSubscriptionInterceptorContext> value)
{
_options.SubscriptionInterceptor = new MqttServerSubscriptionInterceptorDelegate(value);