Пример #1
0
        public void Run()
        {
            IEnumerable <Dome> domes = DeviceProvider.GetDevices <Dome>();

            foreach (var dome in domes)
            {
                try
                {
                    CallDeviceMethods(dome);
                }
                catch (Exception e)
                {
                    Logger.LogError(e, e.Message);
                }
            }
        }
        public async void Run()
        {
            IEnumerable <FilterWheel> filterWheels = DeviceProvider.GetDevices <FilterWheel>();

            foreach (var filterWheel in filterWheels)
            {
                try
                {
                    CallDeviceMethods(filterWheel);
                    await CallDeviceMethodsAsync(filterWheel);
                }
                catch (Exception e)
                {
                    Logger.LogError(e, e.Message);
                }
            }
        }