示例#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));
        }
示例#2
0
 public Task <(bool found, Message message)> TryGetMessage(string conversationId, string messageId)
 {
     return(getMessageMetric.TrackTime(() => store.TryGetMessage(conversationId, messageId)));
 }
示例#3
0
 public Task <(bool found, Message message)> TryGetMessage(string conversationId, string messageId)
 {
     return(faultTolerancePolicy.Execute(
                async() => await store.TryGetMessage(conversationId, messageId)
                ));
 }