0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 09:50:44 -05:00
loot-dump-processor/Process/Reader/Intake/IntakeReaderFactory.cs

16 lines
548 B
C#

namespace LootDumpProcessor.Process.Reader.Intake;
public static class IntakeReaderFactory
{
public static IIntakeReader GetInstance()
{
return (LootDumpProcessorContext.GetConfig().ReaderConfig.IntakeReaderConfig?.IntakeReaderType ?? IntakeReaderTypes.Json) switch
{
IntakeReaderTypes.Json => new JsonFileIntakeReader(),
_ => throw new ArgumentOutOfRangeException(
"IntakeReaderType",
"Value was not defined on IntakeReaderConfig"
)
};
}
}