diff options
author | Emma@Rory& <root@rory.gay> | 2023-07-26 21:02:50 +0200 |
---|---|---|
committer | Emma@Rory& <root@rory.gay> | 2023-07-26 21:02:50 +0200 |
commit | 2e89a0717a60598904c92499adb7e01b2075fbb9 (patch) | |
tree | 56b9b7f07180154d9d98dafa91d7c16a0a872100 /MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs | |
parent | Start of nix flake (diff) | |
download | MatrixUtils-2e89a0717a60598904c92499adb7e01b2075fbb9.tar.xz |
MRU desktop start
Diffstat (limited to 'MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs')
-rw-r--r-- | MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs b/MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs index eefb79c..1de9885 100644 --- a/MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs +++ b/MatrixRoomUtils.Core/Interfaces/Services/IStorageProvider.cs @@ -1,4 +1,4 @@ -namespace MatrixRoomUtils.Core.Interfaces.Services; +namespace MatrixRoomUtils.Core.Interfaces.Services; public interface IStorageProvider { // save all children of a type with reflection @@ -6,7 +6,7 @@ public interface IStorageProvider { 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)!"); @@ -18,29 +18,41 @@ public interface IStorageProvider { 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(); } -} \ No newline at end of file + + // 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(); + } +} |