Esempio n. 1
0
        public void Start()
        {
            var bridges = config.Bridges.Select(item => factory.Construct(item.Value)).ToArray();

            foreach (var lightsManager in bridges)
            {
                lightsManager.Start();
            }

            buttonSubscription = monitoring.StartListening()
                                 .Select(item => item.Mac.GetMacName())
                                 .Where(item => buttons.ContainsKey(item))
                                 .GroupBy(item => item)
                                 .Subscribe(item => { ProcessMessage(item, bridges); });
        }