Exemplo n.º 1
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarGames request)
        {
            var result = SimilarItemsHelper.GetSimilarItems(_userManager,
                _libraryManager,
                _userDataRepository,
                Logger,
                request, item => item is BaseGame,
                SimilarItemsHelper.GetSimiliarityScore);

            return ToOptimizedResult(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarGames request)
        {
            var result = SimilarItemsHelper.GetSimilarItemsResult(_userManager,
                                                                  _itemRepo,
                                                                  _libraryManager,
                                                                  _userDataRepository,
                                                                  Logger,
                                                                  request, item => item is Game,
                                                                  SimilarItemsHelper.GetSimiliarityScore);

            return(ToOptimizedResult(result));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarGames request)
        {
            var dtoOptions = GetDtoOptions(request);

            var result = SimilarItemsHelper.GetSimilarItemsResult(dtoOptions, _userManager,
                                                                  _itemRepo,
                                                                  _libraryManager,
                                                                  _userDataRepository,
                                                                  _dtoService,
                                                                  Logger,
                                                                  request, new[] { typeof(Game) },
                                                                  SimilarItemsHelper.GetSimiliarityScore);

            return(ToOptimizedSerializedResultUsingCache(result));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public object Get(GetSimilarGames request)
        {
            var result = GetSimilarItemsResult(request);

            return(ToOptimizedSerializedResultUsingCache(result));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Gets the specified request.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>System.Object.</returns>
        public async Task <object> Get(GetSimilarGames request)
        {
            var result = await GetSimilarItemsResult(request).ConfigureAwait(false);

            return(ToOptimizedSerializedResultUsingCache(result));
        }