Files
Toolkit2/Toolkit.Foundation/ICache.cs
T
TheXamlGuy bc55c4649b tidy
2024-04-26 23:05:36 +01:00

30 lines
501 B
C#

namespace Toolkit.Foundation;
public interface ICache<TValue> :
IEnumerable<TValue>
{
void Add(TValue value);
void Clear();
bool Remove(TValue value);
}
public interface ICache<TKey, TValue> :
IEnumerable<KeyValuePair<TKey, TValue>>
where TKey :
notnull
where TValue :
notnull
{
void Add(TKey key,
TValue value);
void Clear();
bool ContainsKey(TKey key);
bool Remove(TKey key);
bool TryGetValue(TKey key, out TValue? value);
}