Пример #1
0
        public async Task <Unit> Handle(UpdateChannel request, CancellationToken cancellationToken)
        {
            _logger.Information("Update channel request started CH: {Channel}, D: {Direction}, O: {On}", request.Channel, request.Direction, request.On);

            var channel = _hardwareOptions.Channels[request.Channel];
            await _pinSetter.SetPinAsync(channel.Enable, request.On);

            await _pinSetter.SetPinAsync(channel.One, request.Direction);

            await _pinSetter.SetPinAsync(channel.Two, !request.Direction);

            return(Unit.Value);
        }
Пример #2
0
        public async Task <IActionResult> Test()
        {
            await _pinSetter.SetPinAsync(1, true);

            return(Ok());
        }