Ejemplo n.º 1
0
        public async Task <(bool found, Message message)> TryGetMessage(string conversationId, string messageId)
        {
            if (string.IsNullOrWhiteSpace(conversationId))
            {
                throw new ArgumentNullException(nameof(conversationId));
            }

            if (string.IsNullOrWhiteSpace(messageId))
            {
                throw new ArgumentNullException(nameof(messageId));
            }

            return(await messagesStore.TryGetMessage(conversationId, messageId));
        }
Ejemplo n.º 2
0
 public Task <(bool found, Message message)> TryGetMessage(string conversationId, string messageId)
 {
     return(getMessageMetric.TrackTime(() => store.TryGetMessage(conversationId, messageId)));
 }
Ejemplo n.º 3
0
 public Task <(bool found, Message message)> TryGetMessage(string conversationId, string messageId)
 {
     return(faultTolerancePolicy.Execute(
                async() => await store.TryGetMessage(conversationId, messageId)
                ));
 }