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

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

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

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

            return(response);
        }