コード例 #1
0
        /// <summary>
        /// Allows to stop the adapter.
        ///
        /// Before returning, and if it is so configured,
        /// the adapter sends a "suspend" request to
        /// all the currently registred fixtures.
        /// </summary>
        public void Stop()
        {
            _logger.InfoFormat("Adapter is stopping");

            try
            {
                _platformConnector?.Dispose();
                _udapiServiceFacade?.Disconnect();
                AdapterActorSystem.Dispose();
            }
            catch (Exception e)
            {
                _logger.Error("An error occured while disposing the adapter", e);
            }

            _stats.SetValue(AdapterCoreKeys.ADAPTER_STARTED, "0");
            _logger.InfoFormat("Adapter stopped");
        }