Initial KV API concept

This commit is contained in:
Kruzya
2023-01-05 08:01:18 +03:00
parent a97fac85e4
commit 984e582ce4
8 changed files with 207 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
using System.Threading.Tasks;
namespace Kruzya.TelegramBot.Core.Option;
/// <summary>
/// Allows interact with option related with some chat.
/// </summary>
public interface IOptionItem<T>
{
public IOptionKey Key { get; }
public T Value { get; set; }
public bool IsChanged { get; }
public Task LoadAsync(IOptionStorageAdapter adapter);
public Task SaveAsync(IOptionStorageAdapter adapter);
}