Add CurrentPrice Writer to Writer Factory

This commit is contained in:
Sergey Chebotar 2023-06-20 09:58:39 +03:00
parent 63a962f495
commit a73cc46449

View File

@ -14,6 +14,7 @@ public class WriterFactory
return writerName switch
{
"NewPrice" => (IWriter)_serviceProvider.GetService(typeof(NewPriceWriter)),
"CurrentPrice" => (IWriter)_serviceProvider.GetService(typeof(CurrentPriceWriter)),
"Dxf" => (IWriter)_serviceProvider.GetService(typeof(DxfWriter)),
_ => throw new ArgumentException($"Незвестный интерфейс {nameof(IWriter)}: {writerName}")
};