public EmployeeLogic( IEmployeeService employeeService, IEmployeeQuery employeeQuery) { this.employeeService = employeeService; this.employeeQuery = employeeQuery; }
public List <string> QueryEmployeeNames() { try { IMsgSetRequest requestSet = SessionManager.Instance.CreateMsgSetRequest(); requestSet.Attributes.OnError = ENRqOnError.roeStop; IEmployeeQuery employeeQuery = requestSet.AppendEmployeeQueryRq(); IMsgSetResponse responeSet = SessionManager.Instance.DoRequests(requestSet); IResponseList responseList = responeSet.ResponseList; List <string> employeeNames = new List <string>(); for (int i = 0; i < responseList.Count; i++) { IResponse response = responseList.GetAt(i); if (response.StatusCode == 0) { IEmployeeRetList employeeList = (IEmployeeRetList)response.Detail; for (int j = 0; j < employeeList.Count; j++) { IEmployeeRet employee = employeeList.GetAt(j); employeeNames.Add(employee.Name.GetValue()); } } } return(employeeNames); } catch (Exception ex) { // Handle exception } }
public EmployeeTest() { employeeController = new EmployeeController(); responseClient = Substitute.For <IResponseClient>(); employeeService = Substitute.For <IEmployeeService>(); employeeQuery = Substitute.For <IEmployeeQuery>(); employeeLogic = new EmployeeLogic(employeeService, employeeQuery); }
private void Inicializer() { employeeService = EmployeeService.GetInstance(); employeeQuery = EmployeeQuery.GetInstance(); employeeLogic = EmployeeLogic.GetInstance(employeeService, employeeQuery); responseClient = ResponseClient.GetInstance(); errorMessage = null; }
public EmployeesController(IMapper mapper, IEmployeeQuery employeeQuery, IEmployeeRepository employeeRepository) { _mapper = mapper; _employeeQuery = employeeQuery; _employeeRepository = employeeRepository; }
public async Task <ActionResult> Get(int id, [FromServices] IEmployeeQuery employeeQuery, CancellationToken cancellationToken) { var result = await employeeQuery.Get(id, cancellationToken); if (result == null) { return(NotFound()); } return(Ok(detailedEmployeeMapper.Map(result))); }
public static IEmployeeLogic GetInstance( IEmployeeService employeeService, IEmployeeQuery employeeQuery) { if (Interface != null) { return(Interface); } return(new EmployeeLogic(employeeService, employeeQuery)); }
public GetMeetingsTests() { _meetingQuery = A.Fake <IMeetingQuery>(); _employeeQuery = A.Fake <IEmployeeQuery>(); _host = new HostBuilder() .ConfigureWebHost(webBuilder => { webBuilder .UseTestServer() .Configure(app => { }) .UseStartup <Startup>() .ConfigureTestServices(services => { services.AddTransient(provider => _employeeQuery) .AddTransient(provider => _meetingQuery); }); }) .Start(); _client = _host.GetTestClient(); }
public EmployeeController(ICommandBus commandBus, IEmployeeQuery employeeQuery) { _commandBus = commandBus; _employeeQuery = employeeQuery; }
public EmployeeController(ICommandBus commandBus, IEmployeeQuery employeeQuery) { _commandBus = commandBus; _employeeQuery = employeeQuery; }
public UpdateEmployeeNameHandler(IEmployeeRepository employeeRepository, IEmployeeQuery employeeQuery) { this.employeeRepository = employeeRepository; this.employeeQuery = employeeQuery; }
public MeetingController(IEmployeeQuery employeeQuery, IMeetingQuery meetingQuery, IValidator <SuitableMeetingsRequest> validator) { _employeeQuery = employeeQuery; _meetingQuery = meetingQuery; _validator = validator; }
public EmployeeController(IEmployeeCommand employeeCommand, IEmployeeQuery employeeQuery) { _employeeCommand = employeeCommand; _employeeQuery = employeeQuery; }
/// <summary> /// Initialize /// </summary> /// <param name="mediator"></param> /// <param name="employeeQuery"></param> public EmployeeController(IMediator mediator, IEmployeeQuery employeeQuery) { _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); _employeeQuery = employeeQuery ?? throw new ArgumentNullException(nameof(employeeQuery)); }
public async Task <ActionResult> Get([FromServices] IEmployeeQuery employeeQuery, CancellationToken cancellationToken) { var result = await employeeQuery.Get(cancellationToken); return(Ok(resumedEmployeeMapper.Map(result))); }
public ChangeSalaryHandler(IEmployeeQuery employeeQuery, IWageRepository wageRepository) { this.employeeQuery = employeeQuery; this.wageRepository = wageRepository; }