Task <string> IQueryHandler <GetCurrencySymbol, string> .HandleAsync(GetCurrencySymbol query) { if (storage.TryGetValue(query.UniqueCode, out Model model)) { return(Task.FromResult(model.Symbol)); } throw new CurrencyDoesNotExistException(); }
async Task <string> IQueryHandler <GetCurrencySymbol, string> .HandleAsync(GetCurrencySymbol query) { await EnsureUserStorageAsync(query.UserKey); if (storage[query.UserKey].TryGetValue(query.UniqueCode, out Model model)) { return(model.Symbol); } throw new CurrencyDoesNotExistException(); }