示例#1
0
        public object Get(GetProgram request)
        {
            var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(new Guid(request.UserId));

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

            return(ToOptimizedSerializedResultUsingCache(result));
        }
示例#2
0
        public async Task <object> Get(GetProgram request)
        {
            var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(request.UserId);

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

            return(ToOptimizedSerializedResultUsingCache(result));
        }