Пример #1
0
 private void IdentifyAreas(string input)
 {
     foreach (var area in _areaService.GetAreas())
     {
         if (IsCaptionOrKeywordMatch(input, area.Settings.Caption, area.Settings.Keywords))
         {
             _currentContext.IdentifiedAreaIds.Add(area.Id);
         }
     }
 }
Пример #2
0
        private object PrepareDicsoverMessage()
        {
            var devices = new List <AlexaDevice>();

            foreach (var area in _areService.GetAreas())
            {
                var areaName       = area.Settings?.Caption;
                var areaComponents = area.GetComponents();

                devices.AddRange(GetDevicesFromArea(areaName, areaComponents));
            }

            devices.AddRange(GetExplisitRegiterDevices());

            return(DiscoverResponse.GenerateResponse(devices));
        }