コード例 #1
0
        private async Task <int> CountAsync(CancellationToken cancellationToken)
        {
            var requestMessage  = MapSizeCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendAsync(requestMessage, cancellationToken).CAF();

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

            return(response);
        }
コード例 #2
0
        public int Size()
        {
            var request = MapSizeCodec.EncodeRequest(GetName());

            return(Invoke(request, m => MapSizeCodec.DecodeResponse(m).response));
        }