static async Task Main() { var db = new SmsUserDb() { UserId = "user ID" }; var cache = new Cache(); cache.Add("key", db); Console.WriteLine("Press RETURN to await cache.GetHashedAsync()"); Console.ReadLine(); var result = await cache.GetHashedAsync("key"); Console.WriteLine("Press RETURN to await Reminders[0].Value"); Console.ReadLine(); Console.WriteLine((await result.Reminders)[0].Value); }
public void Add(string key, SmsUserDb value) { _cache.Add(key, value); }