2024-10-17 15:06:22 -04:00
|
|
|
namespace HermesSocketServer.Store
|
|
|
|
{
|
|
|
|
public interface IStore<K, V>
|
|
|
|
{
|
|
|
|
V? Get(K key);
|
2024-10-17 23:21:16 -04:00
|
|
|
IDictionary<K, V> Get();
|
2024-10-17 15:06:22 -04:00
|
|
|
Task Load();
|
2024-10-20 14:07:18 -04:00
|
|
|
bool Modify(K? key, Action<V> action);
|
2024-10-17 15:06:22 -04:00
|
|
|
void Remove(K? key);
|
2024-10-17 17:17:09 -04:00
|
|
|
Task<bool> Save();
|
2024-10-17 15:06:22 -04:00
|
|
|
bool Set(K? key, V? value);
|
|
|
|
}
|
|
|
|
}
|