mirror of
https://github.com/sp-tarkov/loot-dump-processor.git
synced 2025-02-13 09:50:44 -05:00
![CWX](/assets/img/avatar_default.png)
* Seperate Tasks into their own methods, Add method to add map name to file name * Formatting and added a few comments * Add Clear method to collectors * Change to local var, so data isnt stored longer than needed * add Clear method to Storages * Add changes for Per Map Processing and file i forgot to commit last time * Update config to have mapNames in it, removed unused yaml file * update comment * changed to not throw so Filemode still can be used
33 lines
750 B
C#
33 lines
750 B
C#
namespace LootDumpProcessor.Storage.Implementations.File;
|
|
|
|
public class FileDataStorage : IDataStorage
|
|
{
|
|
public void Setup()
|
|
{
|
|
}
|
|
|
|
public void Store<T>(T t) where T : IKeyable
|
|
{
|
|
StoreHandlerFactory.GetInstance(t.GetKey().GetKeyType()).Store(t);
|
|
}
|
|
|
|
public bool Exists(IKey t)
|
|
{
|
|
return StoreHandlerFactory.GetInstance(t.GetKeyType()).Exists(t);
|
|
}
|
|
|
|
public T GetItem<T>(IKey key) where T : IKeyable
|
|
{
|
|
return 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
|
|
}
|
|
} |