public InvestmentForecastController(IInvestmentForecastOrchestrator orchestrator,
                                     IServiceRequestMapper requestMapper, IServiceResponseMapper responseMapper)
 {
     _orchestrator   = orchestrator;
     _requestMapper  = requestMapper;
     _responseMapper = responseMapper;
 }
示例#2
0
 public InvestmentForecastOrchestration(IServiceRequestMapper requestMapper, IServiceResponseMapper responseMapper,
                                        IInvestmentForecastService orchestrator)
 {
     _requestMapper  = requestMapper;
     _responseMapper = responseMapper;
     _orchestrator   = orchestrator;
 }
示例#3
0
 //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;
 }
示例#4
0
 public AuditController(
     IAuditManager auditManager,
     ILogger <AuditController> logger,
     WorkContext workContext,
     IServiceResponseMapper serviceResponseMapper
     )
 {
     _auditManager          = auditManager;
     _logger                = logger;
     _workContext           = workContext;
     _serviceResponseMapper = serviceResponseMapper;
 }
示例#5
0
        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));
 }