public InvestmentForecastController(IInvestmentForecastOrchestrator orchestrator, IServiceRequestMapper requestMapper, IServiceResponseMapper responseMapper) { _orchestrator = orchestrator; _requestMapper = requestMapper; _responseMapper = responseMapper; }
public InvestmentForecastOrchestration(IServiceRequestMapper requestMapper, IServiceResponseMapper responseMapper, IInvestmentForecastService orchestrator) { _requestMapper = requestMapper; _responseMapper = responseMapper; _orchestrator = orchestrator; }
//private readonly ICrudService<T> _crudService; //private readonly IServiceResponseMapper _serviceResponseMapper; //private readonly ILogger<GenericParentController<T>> _logger; //private readonly AnyServiceConfig _config; //private readonly WorkContext _workContext; //private readonly Type _curType; //private readonly Type _mapToType; #endregion #region ctor public GenericParentController( IServiceProvider serviceProvider, AnyServiceConfig config, IServiceResponseMapper serviceResponseMapper, WorkContext workContext, ILogger <GenericParentController <T> > logger) { //_crudService = serviceProvider.GetService<ICrudService<T>>(); //_config = config; //_serviceResponseMapper = serviceResponseMapper; //_workContext = workContext; //_logger = logger; }
public AuditController( IAuditManager auditManager, ILogger <AuditController> logger, WorkContext workContext, IServiceResponseMapper serviceResponseMapper ) { _auditManager = auditManager; _logger = logger; _workContext = workContext; _serviceResponseMapper = serviceResponseMapper; }
public GenericController( IServiceProvider serviceProvider, AnyServiceConfig config, IServiceResponseMapper serviceResponseMapper, WorkContext workContext, ILogger <GenericController <TResponseObject, TDomainObject> > logger) { _crudService = serviceProvider.GetService <ICrudService <TDomainObject> >(); _config = config; _serviceResponseMapper = serviceResponseMapper; _workContext = workContext; _logger = logger; _curTypeName = _workContext.CurrentEntityConfigRecord.Name; _curType = _workContext.CurrentEntityConfigRecord.Type; _mapToType = _workContext.CurrentEntityConfigRecord.EndpointSettings.MapToType; _mapToPageType = _workContext.CurrentEntityConfigRecord.EndpointSettings.MapToPaginationType; _shouldMap = _curType != _mapToType; }
public static IActionResult MapServiceResponse <TDestination>(this IServiceResponseMapper mapper, ServiceResponse serviceResponse) where TDestination : class { return(mapper.MapServiceResponse(typeof(TDestination), serviceResponse)); }