Esempio n. 1
0
        public IEnumerable <Channel> GetSubscribedChannelsBySessionId(string sessionId)
        {
            var device = _devicesRepository.GetDevice(sessionId);

            var channelsIds = _channelsService.GetSubscribedChannelsByDeviceId(device.Id);

            return(GetByIds(channelsIds));
        }
Esempio n. 2
0
        public Operation <string> GetDeviceId(string sessionId)
        {
            Operation <string> op = new Operation <string>
            {
                IsValid = true
            };

            _deviceValidator.ValidateGetDeviceId(op, sessionId);

            if (!op.IsValid)
            {
                return(op);
            }

            op.Payload = _devicesRepository.GetDevice(sessionId).Id;

            return(op);
        }
Esempio n. 3
0
 public string GetDeviceId(string sessionId)
 {
     return(_devicesRepository.GetDevice(sessionId)?.Id);
 }
 public DomainDevice SearchDevice(int deviceId)
 {
     return(_devicesRepository.GetDevice(deviceId)?.ToDomain());
 }