From 0d0511e35d9965fc0ea5190ae3347c3d77c3334c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 14 Aug 2023 04:09:13 +0200 Subject: Split LibMatrix into separate repo --- LibMatrix/Interfaces/Services/IStorageProvider.cs | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 LibMatrix/Interfaces/Services/IStorageProvider.cs (limited to 'LibMatrix/Interfaces/Services') diff --git a/LibMatrix/Interfaces/Services/IStorageProvider.cs b/LibMatrix/Interfaces/Services/IStorageProvider.cs new file mode 100644 index 0000000..519d8ed --- /dev/null +++ b/LibMatrix/Interfaces/Services/IStorageProvider.cs @@ -0,0 +1,58 @@ +namespace LibMatrix.Interfaces.Services; + +public interface IStorageProvider { + // save all children of a type with reflection + public Task SaveAllChildrenAsync(string key, T value) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement SaveAllChildren(key, value)!"); + throw new NotImplementedException(); + } + + // load all children of a type with reflection + public Task LoadAllChildrenAsync(string key) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadAllChildren(key)!"); + throw new NotImplementedException(); + } + + + public Task SaveObjectAsync(string key, T value) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement SaveObject(key, value)!"); + throw new NotImplementedException(); + } + + // load + public Task LoadObjectAsync(string key) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadObject(key)!"); + throw new NotImplementedException(); + } + + // check if exists + public Task ObjectExistsAsync(string key) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement ObjectExists(key)!"); + throw new NotImplementedException(); + } + + // get all keys + public Task> GetAllKeysAsync() { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement GetAllKeys()!"); + throw new NotImplementedException(); + } + + + // delete + public Task DeleteObjectAsync(string key) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement DeleteObject(key)!"); + throw new NotImplementedException(); + } + + // save stream + public Task SaveStreamAsync(string key, Stream stream) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement SaveStream(key, stream)!"); + throw new NotImplementedException(); + } + + // load stream + public Task LoadStreamAsync(string key) { + Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadStream(key)!"); + throw new NotImplementedException(); + } +} -- cgit 1.4.1