Example #1
0
        public async Task <object> Get(GetChannel request)
        {
            var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(request.UserId);

            var result = await _liveTvManager.GetChannel(request.Id, CancellationToken.None, user).ConfigureAwait(false);

            return(ToOptimizedSerializedResultUsingCache(result));
        }
Example #2
0
        public object Get(GetChannel request)
        {
            var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(new Guid(request.UserId));

            var result = _liveTvManager.GetChannel(request.Id, CancellationToken.None, user).Result;

            return(ToOptimizedSerializedResultUsingCache(result));
        }
Example #3
0
        public object Get(GetChannel request)
        {
            var user = string.IsNullOrWhiteSpace(request.UserId) ? null : _userManager.GetUserById(request.UserId);

            var item = _libraryManager.GetItemById(request.Id);

            var dtoOptions = GetDtoOptions(request);

            var result = _dtoService.GetBaseItemDto(item, dtoOptions, user);

            return(ToOptimizedSerializedResultUsingCache(result));
        }