public Task AddAsync(MagnetMessage message, CancellationToken cancellationToken) { MessageRecord record = _mapper.Map <MessageRecord>(message); _messages.Add(record); return(Task.CompletedTask); }
public Task AddReadReceiptAsync(MessageReceivedReceipt receipt, CancellationToken cancellationToken) { MessageRecord msg = _messages.FirstOrDefault(x => x.Id == receipt.MessageId); msg.ReceivedLog.Add(new MessageReceivedLog { ClientName = receipt.ClientName, IsMatch = receipt.IsMatch, ReceivedAt = receipt.ReceivedAt }); return(Task.CompletedTask); }