// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. namespace Microsoft.Teams.Common.Storage; /// /// a storage container that can get/set/delete items by a unique key /// /// the key type /// the value type public interface IStorage where TKey : notnull { public bool Exists(TKey key); public Task ExistsAsync(TKey key); public TValue? Get(TKey key); public T? Get(TKey key) where T : TValue; public Task GetAsync(TKey key); public Task GetAsync(TKey key) where T : TValue; public void Set(TKey key, TValue value); public Task SetAsync(TKey key, TValue value); public void Delete(TKey key); public Task DeleteAsync(TKey key); }