public T Peek() { var request = QueuePeekCodec.EncodeRequest(GetName()); var result = Invoke(request, m => QueuePeekCodec.DecodeResponse(m).response); return(ToObject <T>(result)); }
/// <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)); }