chomp
6e4c7abf73
Co-authored-by: Alex <alex@dm-me-for-questions.com> Reviewed-on: SPT-AKI/LootDumpProcessor#6
17 lines
557 B
C#
17 lines
557 B
C#
namespace LootDumpProcessor.Process.Collector;
|
|
|
|
public static class CollectorFactory
|
|
{
|
|
private static ICollector? _collector;
|
|
public static ICollector GetInstance()
|
|
{
|
|
if (_collector == null)
|
|
_collector = LootDumpProcessorContext.GetConfig().CollectorConfig.CollectorType switch
|
|
{
|
|
CollectorType.Memory => new HashSetCollector(),
|
|
CollectorType.Dump => new DumpCollector(),
|
|
_ => throw new ArgumentOutOfRangeException()
|
|
};
|
|
return _collector;
|
|
}
|
|
} |