0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 02:10:46 -05:00

Removed unused GetAll method from storage interfaces and implementations

This commit is contained in:
bluextx 2025-01-11 11:08:37 +03:00
parent 4003ca254b
commit e52a8b2fad
7 changed files with 3 additions and 16 deletions

View File

@ -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<string, int> 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();
}

View File

@ -6,6 +6,5 @@ public interface IDataStorage
void Store<T>(T t) where T : IKeyable;
bool Exists(IKey t);
T GetItem<T>(IKey key) where T : IKeyable;
List<T> GetAll<T>();
void Clear();
}

View File

@ -16,8 +16,6 @@ public class FileDataStorage : IDataStorage
public T GetItem<T>(IKey key) where T : IKeyable =>
StoreHandlerFactory.GetInstance(key.GetKeyType()).Retrieve<T>(key);
public List<T> GetAll<T>() => throw new NotImplementedException();
public void Clear()
{
// leaving empty so this the File version can still be used it needed

View File

@ -29,8 +29,6 @@ public abstract class AbstractStoreHandler : IStoreHandler
return System.IO.File.Exists(locationWithFile);
}
public abstract List<T> RetrieveAll<T>() where T : IKeyable;
protected abstract string GetLocation(IKey key);
protected virtual string GetBaseLocation()

View File

@ -2,8 +2,6 @@ namespace LootDumpProcessor.Storage.Implementations.File.Handlers;
public class FlatStoreHandler : AbstractStoreHandler
{
public override List<T> RetrieveAll<T>() => throw new NotImplementedException();
protected override string GetLocation(IKey key)
{
var baseLocation = GetBaseLocation();

View File

@ -2,8 +2,6 @@ namespace LootDumpProcessor.Storage.Implementations.File.Handlers;
public class SubdivisionedStoreHandler : AbstractStoreHandler
{
public override List<T> RetrieveAll<T>() => throw new NotImplementedException();
protected override string GetLocation(IKey key)
{
var location = $"{GetBaseLocation()}/{string.Join("/", key.GetLookupIndex().SkipLast(1))}";

View File

@ -35,8 +35,6 @@ public class MemoryDataStorage : IDataStorage
return default;
}
public List<T> GetAll<T>() => throw new NotImplementedException();
private string GetLookupKey(IKey key) => string.Join("-", key.GetLookupIndex());
public void Clear()