public InfrastructureService(IConfiguration configuration, ILogEngineService logEngine, IStringLocalizer <Resources> localizer, IMapper mapper) { Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); LogEngine = logEngine ?? throw new ArgumentNullException(nameof(logEngine)); Localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); Mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public ApiControllerBase(IInfrastructureService infrastructure) { Configuration = infrastructure.Configuration; LogEngine = infrastructure.LogEngine; Localizer = infrastructure.Localizer; Mapper = infrastructure.Mapper; }
//protected readonly PublicApiConfiguration PublicApiConfiguration; public ServiceBase(IInfrastructureService infrastructure, IHttpContextAccessor httpContextAccessor, IHttpClientFactory httpClientFactory) { Configuration = infrastructure.Configuration; LogEngine = infrastructure.LogEngine; Mapper = infrastructure.Mapper; HttpContextAccessor = httpContextAccessor; //PublicApiConfiguration = infrastructure.OptionsPublicApiConfiguration.Value; HttpClientFactory = httpClientFactory; }