示例#1
0
        public async Task StopAsync()
        {
            if (!IsStarted)
            {
                return;
            }

            Log.Information("Stopping service...");
            await DoWork(async() =>
            {
                m_Automation.Stop();
                IsStarted = false;

                await m_Automation.CloseDevicesAsync();
            });

            Log.Information("Service has stopped");
        }