public string AddInterceptor(IMapInterceptor interceptor)
        {
            var data    = ToData(interceptor);
            var request = MapAddInterceptorCodec.EncodeRequest(GetName(), data);

            return(Invoke(request, m => MapAddInterceptorCodec.DecodeResponse(m).response));
        }
Beispiel #2
0
        private async Task <string> AddInterceptorAsync(IMapInterceptor interceptor, CancellationToken cancellationToken)
        {
            var interceptorData = ToSafeData(interceptor);

            var requestMessage  = MapAddInterceptorCodec.EncodeRequest(Name, interceptorData);
            var responseMessage = await Cluster.Messaging.SendAsync(requestMessage, cancellationToken).CfAwait();

            var response = MapAddInterceptorCodec.DecodeResponse(responseMessage).Response;

            return(response);
        }
Beispiel #3
0
 /// <inheritdoc />
 public Task <string> AddInterceptorAsync(IMapInterceptor interceptor)
 => AddInterceptorAsync(interceptor, CancellationToken.None);