CLI and Publish Tests
This commit was merged in pull request #63.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Services;
|
||||
|
||||
namespace IGP.Calculator.Cli.Services;
|
||||
|
||||
public class NullStorageService : IStorageService
|
||||
{
|
||||
private readonly Dictionary<string, object?> _store = new();
|
||||
|
||||
public void Subscribe(Action action) { }
|
||||
public void Unsubscribe(Action action) { }
|
||||
|
||||
public T GetValue<T>(string forKey)
|
||||
{
|
||||
if (_store.TryGetValue(forKey, out var value) && value is T typed)
|
||||
return typed;
|
||||
return default!;
|
||||
}
|
||||
|
||||
public void SetValue<T>(string key, T value)
|
||||
{
|
||||
_store[key] = value;
|
||||
}
|
||||
|
||||
public Task Load() => Task.CompletedTask;
|
||||
}
|
||||
Reference in New Issue
Block a user