2024-01-30 14:54:01 +00:00
|
|
|
|
namespace LootDumpProcessor.Process.Reader.Intake;
|
2023-08-12 19:08:38 +01:00
|
|
|
|
|
|
|
|
|
public static class IntakeReaderFactory
|
|
|
|
|
{
|
|
|
|
|
public static IIntakeReader GetInstance()
|
|
|
|
|
{
|
2024-01-30 14:54:01 +00:00
|
|
|
|
return (LootDumpProcessorContext.GetConfig().ReaderConfig.IntakeReaderConfig?.IntakeReaderType ?? IntakeReaderTypes.Json) switch
|
2023-08-12 19:08:38 +01:00
|
|
|
|
{
|
|
|
|
|
IntakeReaderTypes.Json => new JsonFileIntakeReader(),
|
|
|
|
|
_ => throw new ArgumentOutOfRangeException(
|
|
|
|
|
"IntakeReaderType",
|
|
|
|
|
"Value was not defined on IntakeReaderConfig"
|
|
|
|
|
)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|