public T Peek()
        {
            var request = QueuePeekCodec.EncodeRequest(GetName());
            var result  = Invoke(request, m => QueuePeekCodec.DecodeResponse(m).response);

            return(ToObject <T>(result));
        }
示例#2
0
        /// <inheritdoc />
        public async Task <T> TryPeekAsync() // peek, or null
        {
            var requestMessage  = QueuePeekCodec.EncodeRequest(Name);
            var responseMessage = await Cluster.Messaging.SendToPartitionOwnerAsync(requestMessage, PartitionId).CAF();

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

            return(ToObject <T>(response));
        }