public MachineApplication(ICheckTargetRepository repository, IProgramLog <ILogger> programLog, IExceptionLog <ILogger> errorLog, IpcServiceClient <ICheckTargetServiceContract> client) { Repository = repository; _programLog = programLog; _errorLog = errorLog; _client = client; }
public PingHostedService(IProgramLog <ILogger> programLog, IExceptionLog <ILogger> errorLog, IToolConfigApplication toolConfigApplication, ICheckTargetRepository repository, ISchedulerFactory schedulerFactory, IIpcServiceHost ipcServiceHost) { _programLog = programLog; _errorLog = errorLog; _toolConfigApplication = toolConfigApplication; this._schedulerFactory = schedulerFactory; _ipcServiceHost = ipcServiceHost; _repository = repository; }
public CheckTargetQuery(ICheckTargetRepository checkTargetRepository, ICheckTargetService checkTargetService) { this.checkTargetRepository = checkTargetRepository; this.checkTargetService = checkTargetService; FieldAsync <ListGraphType <CheckTargetType> >("cheks", arguments: new QueryArguments( new QueryArgument <DateGraphType> { Name = "start" }, new QueryArgument <DateGraphType> { Name = "end" } ), resolve: async context => { var start = context.GetArgument <DateTime>("start"); var end = context.GetArgument <DateTime>("end"); return(await this.checkTargetRepository.GetCheckTargetByPeriodAsync(start, end)); }); FieldAsync <ListGraphType <IntGraphType> >("checkTarget", arguments: new QueryArguments( new QueryArgument <IntGraphType> { Name = "target" }, new QueryArgument <ListGraphType <IntGraphType> > { Name = "sequence" } ), resolve: async context => { var target = context.GetArgument <int>("target"); var sequence = context.GetArgument <List <int> >("sequence"); return(await this.checkTargetService.CheckAsync(new CheckTarget { Target = target, Sequence = sequence })); }); }
public CheckTargetService(ICheckTargetRepository checkTargetRepository) { this.checkTargetRepository = checkTargetRepository; }