private void AddRoom(ServiceDTO serviceDto, RoomBuilder roomBuilder) { var area = new AttachedPropertyDTO { AttachedActor = roomBuilder.Name, Properties = new Dictionary <string, string>() }; if (!string.IsNullOrWhiteSpace(_workingTime)) { area.Properties[MotionProperties.WorkingTime] = _workingTime; } foreach (var property in roomBuilder.Properties) { area.Properties[property.Key] = property.Value; } foreach (var detector in roomBuilder.Detectors.Values) { AddMotionSensor(detector.DetectorName, roomBuilder.Name, detector.Neighbors, serviceDto); } serviceDto.AreasAttachedProperties.Add(area); }
public LightAutomationServiceBuilder WithRoom(RoomBuilder room) { _rooms.Add(room.Name, room); return(this); }