23 lines
931 B
C#
23 lines
931 B
C#
using Hcs.WebApp.Data.Hcs;
|
|
|
|
namespace Hcs.WebApp.BackgroundServices.CampaignManagers
|
|
{
|
|
public class ManagerFactory(IServiceScopeFactory serviceScopeFactory, OperationExecutionState operationExecutionState, ResultWaitState resultWaitState)
|
|
{
|
|
protected readonly IServiceScopeFactory serviceScopeFactory = serviceScopeFactory;
|
|
protected readonly OperationExecutionState operationExecutionState = operationExecutionState;
|
|
protected readonly ResultWaitState resultWaitState = resultWaitState;
|
|
|
|
public IManager? CreateManager(Campaign campaign)
|
|
{
|
|
switch (campaign.Type)
|
|
{
|
|
case Campaign.CampaignType.ExportCommonRegistryElements_15_7_0_1:
|
|
return new ExportCommonRegistryElementsManager_15_7_0_1(serviceScopeFactory, operationExecutionState, resultWaitState, campaign);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|