about summary refs log tree commit diff
path: root/LibMatrix/Interfaces/Services/IStorageProvider.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 04:09:13 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-08-14 04:09:13 +0200
commit0d0511e35d9965fc0ea5190ae3347c3d77c3334c (patch)
treeb4e0c336cbccc37bd14952b447868a577ea15540 /LibMatrix/Interfaces/Services/IStorageProvider.cs
downloadLibMatrix-0d0511e35d9965fc0ea5190ae3347c3d77c3334c.tar.xz
Split LibMatrix into separate repo
Diffstat (limited to 'LibMatrix/Interfaces/Services/IStorageProvider.cs')
-rw-r--r--LibMatrix/Interfaces/Services/IStorageProvider.cs58
1 files changed, 58 insertions, 0 deletions
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<T>(string key, T value) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement SaveAllChildren<T>(key, value)!");
+        throw new NotImplementedException();
+    }
+
+    // load all children of a type with reflection
+    public Task<T?> LoadAllChildrenAsync<T>(string key) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadAllChildren<T>(key)!");
+        throw new NotImplementedException();
+    }
+
+
+    public Task SaveObjectAsync<T>(string key, T value) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement SaveObject<T>(key, value)!");
+        throw new NotImplementedException();
+    }
+
+    // load
+    public Task<T?> LoadObjectAsync<T>(string key) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadObject<T>(key)!");
+        throw new NotImplementedException();
+    }
+
+    // check if exists
+    public Task<bool> ObjectExistsAsync(string key) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement ObjectExists(key)!");
+        throw new NotImplementedException();
+    }
+
+    // get all keys
+    public Task<List<string>> 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<Stream?> LoadStreamAsync(string key) {
+        Console.WriteLine($"StorageProvider<{GetType().Name}> does not implement LoadStream(key)!");
+        throw new NotImplementedException();
+    }
+}