Files
hcs/Hcs.WebApp/BackgroundServices/OperationExecutors/ExecutorFactory.cs

25 lines
961 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Hcs.Broker;
using Hcs.WebApp.BackgroundServices.OperationExecutors.Nsi;
using Hcs.WebApp.BackgroundServices.OperationExecutors.NsiCommon;
using Hcs.WebApp.Data.Hcs;
namespace Hcs.WebApp.BackgroundServices.OperationExecutors
{
public class ExecutorFactory
{
public IExecutor CreateExecutor(IServiceScope scope, IClient client, Operation operation)
{
switch (operation.Type)
{
case Operation.OperationType.Nsi_ExportNsiItem_15_7_0_1:
return new ExportDataProviderNsiItemExecutor_15_7_0_1(client, scope, operation);
case Operation.OperationType.NsiCommon_ExportNsiItem_15_7_0_1:
return new ExportNsiItemExecutor_15_7_0_1(client, scope, operation);
}
throw new NotImplementedException($"Не удалось создать выполнителя операции типа {operation.Type}");
}
}
}