microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
aacebo/mcp-client

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Common/Storage/Storage.cs

23lines · modecode

1namespace Microsoft.Teams.Common.Storage;
2
3/// <summary>
4/// a storage container that can get/set/delete items by a unique key
5/// </summary>
6/// <typeparam name="TKey">the key type</typeparam>
7/// <typeparam name="TValue">the value type</typeparam>
8public interface IStorage<TKey, TValue> where TKey : notnull
9{
10 public bool Exists(TKey key);
11 public Task<bool> ExistsAsync(TKey key);
12
13 public TValue? Get(TKey key);
14 public T? Get<T>(TKey key) where T : TValue;
15 public Task<TValue?> GetAsync(TKey key);
16 public Task<T?> GetAsync<T>(TKey key) where T : TValue;
17
18 public void Set(TKey key, TValue value);
19 public Task SetAsync(TKey key, TValue value);
20
21 public void Delete(TKey key);
22 public Task DeleteAsync(TKey key);
23}