Пример #1
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            _logger.LogInformation("RFID Service is stopping.");

            await _rfidReader.StopAsync();

            _logger.LogInformation("RFID Service has stopped.");
        }
Пример #2
0
        public async Task StopAsync(CancellationToken cancellationToken)
        {
            whenButtonPressedSubscription.Dispose();
            whenButtonReleasedSubscription.Dispose();

            whenSwitchClosedSubscription.Dispose();
            whenSwitchOpenedSubscription.Dispose();

            whenMotionDetectedSubscription.Dispose();
            whenMotionNotDetectedSubscription.Dispose();

            await _rfidReader.StopAsync();

            whenCardDataReceivedSubscription.Dispose();
        }