From e52a8b2faddd1127efe31f6f5ce0053ed59bc874 Mon Sep 17 00:00:00 2001 From: bluextx Date: Sat, 11 Jan 2025 11:08:37 +0300 Subject: [PATCH] Removed unused GetAll method from storage interfaces and implementations --- .../Model/Processing/PreProcessedLooseLoot.cs | 8 +++----- source/LootDumpProcessor/Storage/IDataStorage.cs | 1 - .../Storage/Implementations/File/FileDataStorage.cs | 2 -- .../Implementations/File/Handlers/AbstractStoreHandler.cs | 2 -- .../Implementations/File/Handlers/FlatStoreHandler.cs | 2 -- .../File/Handlers/SubdivisionedStoreHandler.cs | 2 -- .../Storage/Implementations/Memory/MemoryDataStorage.cs | 2 -- 7 files changed, 3 insertions(+), 16 deletions(-) diff --git a/source/LootDumpProcessor/Model/Processing/PreProcessedLooseLoot.cs b/source/LootDumpProcessor/Model/Processing/PreProcessedLooseLoot.cs index 42ae573..8ffb913 100644 --- a/source/LootDumpProcessor/Model/Processing/PreProcessedLooseLoot.cs +++ b/source/LootDumpProcessor/Model/Processing/PreProcessedLooseLoot.cs @@ -1,16 +1,14 @@ +using System.Text.Json.Serialization; using LootDumpProcessor.Serializers.Json.Converters; using LootDumpProcessor.Storage; namespace LootDumpProcessor.Model.Processing; -public class PreProcessedLooseLoot : IKeyable +public class PreProcessedLooseLoot { public Dictionary Counts { get; set; } - [System.Text.Json.Serialization.JsonConverter(typeof(NetJsonKeyConverter))] - public IKey ItemProperties { get; set; } + [JsonConverter(typeof(NetJsonKeyConverter))] public IKey ItemProperties { get; set; } public int MapSpawnpointCount { get; set; } - - public IKey GetKey() => throw new NotImplementedException(); } \ No newline at end of file diff --git a/source/LootDumpProcessor/Storage/IDataStorage.cs b/source/LootDumpProcessor/Storage/IDataStorage.cs index a49cad5..55ddb8f 100644 --- a/source/LootDumpProcessor/Storage/IDataStorage.cs +++ b/source/LootDumpProcessor/Storage/IDataStorage.cs @@ -6,6 +6,5 @@ public interface IDataStorage void Store(T t) where T : IKeyable; bool Exists(IKey t); T GetItem(IKey key) where T : IKeyable; - List GetAll(); void Clear(); } \ No newline at end of file diff --git a/source/LootDumpProcessor/Storage/Implementations/File/FileDataStorage.cs b/source/LootDumpProcessor/Storage/Implementations/File/FileDataStorage.cs index a91f782..5c24fe6 100644 --- a/source/LootDumpProcessor/Storage/Implementations/File/FileDataStorage.cs +++ b/source/LootDumpProcessor/Storage/Implementations/File/FileDataStorage.cs @@ -16,8 +16,6 @@ public class FileDataStorage : IDataStorage public T GetItem(IKey key) where T : IKeyable => StoreHandlerFactory.GetInstance(key.GetKeyType()).Retrieve(key); - public List GetAll() => throw new NotImplementedException(); - public void Clear() { // leaving empty so this the File version can still be used it needed diff --git a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/AbstractStoreHandler.cs b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/AbstractStoreHandler.cs index 34a5b60..3bd885d 100644 --- a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/AbstractStoreHandler.cs +++ b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/AbstractStoreHandler.cs @@ -29,8 +29,6 @@ public abstract class AbstractStoreHandler : IStoreHandler return System.IO.File.Exists(locationWithFile); } - public abstract List RetrieveAll() where T : IKeyable; - protected abstract string GetLocation(IKey key); protected virtual string GetBaseLocation() diff --git a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/FlatStoreHandler.cs b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/FlatStoreHandler.cs index c4f0ca5..d8c9a9f 100644 --- a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/FlatStoreHandler.cs +++ b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/FlatStoreHandler.cs @@ -2,8 +2,6 @@ namespace LootDumpProcessor.Storage.Implementations.File.Handlers; public class FlatStoreHandler : AbstractStoreHandler { - public override List RetrieveAll() => throw new NotImplementedException(); - protected override string GetLocation(IKey key) { var baseLocation = GetBaseLocation(); diff --git a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs index 14e7e34..e720d42 100644 --- a/source/LootDumpProcessor/Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs +++ b/source/LootDumpProcessor/Storage/Implementations/File/Handlers/SubdivisionedStoreHandler.cs @@ -2,8 +2,6 @@ namespace LootDumpProcessor.Storage.Implementations.File.Handlers; public class SubdivisionedStoreHandler : AbstractStoreHandler { - public override List RetrieveAll() => throw new NotImplementedException(); - protected override string GetLocation(IKey key) { var location = $"{GetBaseLocation()}/{string.Join("/", key.GetLookupIndex().SkipLast(1))}"; diff --git a/source/LootDumpProcessor/Storage/Implementations/Memory/MemoryDataStorage.cs b/source/LootDumpProcessor/Storage/Implementations/Memory/MemoryDataStorage.cs index b514167..f7c8256 100644 --- a/source/LootDumpProcessor/Storage/Implementations/Memory/MemoryDataStorage.cs +++ b/source/LootDumpProcessor/Storage/Implementations/Memory/MemoryDataStorage.cs @@ -35,8 +35,6 @@ public class MemoryDataStorage : IDataStorage return default; } - public List GetAll() => throw new NotImplementedException(); - private string GetLookupKey(IKey key) => string.Join("-", key.GetLookupIndex()); public void Clear()