Ejemplo n.º 1
0
        public async System.Threading.Tasks.Task PostOpenDoor(string roomAddress, string securityKey)
        {
            _conferenceRoomService.SecurityCheck(roomAddress, securityKey);
            var info = _roomRepository.GetRoomInfo(roomAddress);

            if (string.IsNullOrEmpty(info.GdoDeviceId))
            {
                throw new ArgumentException("No door to control");
            }
            await _gdoService.Open(info.GdoDeviceId);
        }
Ejemplo n.º 2
0
        public async Task PostOpenDoor(string roomId)
        {
            var room = _roomRepository.GetRoomInfo(roomId);

            await AssertRoomIsFromOrg(room);

            await _conferenceRoomService.SecurityCheck(room);

            if (string.IsNullOrEmpty(room.GdoDeviceId))
            {
                throw new ArgumentException("No door to control");
            }
            await _gdoService.Open(room.GdoDeviceId);
        }