Example #1
0
 public void Setup()
 {
     _gameImageService    = A.Fake <IGameImageService>();
     _mapper              = A.Fake <IMapper>();
     _logger              = A.Fake <ILogger <GameImageController> >();
     _gameImageController = new GameImageController(_gameImageService, _mapper, _logger);
 }
Example #2
0
 public GameImageController(
     IGameImageService gameImageService,
     IMapper mapper,
     ILogger <GameImageController> logger)
 {
     _gameImageService = gameImageService;
     _mapper           = mapper;
     _logger           = logger;
 }
Example #3
0
 public GamesService(
     LeaderBoardContext context,
     IGameImageService gameImageService,
     IMapper mapper)
 {
     _context          = context;
     _gameImageService = gameImageService;
     _mapper           = mapper;
 }
Example #4
0
 public MenuViewModel(IWindowManager windowManager, IGameImageService gameImageService, IMessageManager messageManager)
 {
     _windowManager    = windowManager;
     _gameImageService = gameImageService;
     _messageManager   = messageManager;
     NextCommand       = new DelegateCommand(Next, CanNext);
     BackCommand       = new DelegateCommand(Back, CanBack);
     DisplayName       = "Admin";
 }
        public async Task Invoke(HttpContext context, IGameImageService gameImageService)
        {
            var path = context.Request.Path.Value;

            if (!path.Contains(ExpectedPath))
            {
                await _next(context);

                return;
            }

            const string id    = "1";
            var          image = await gameImageService.GetByIdAsync(id);

            context.Items["game-image"] = image;

            await _next(context);
        }
 public GamesController(IGamesService gamesService,
                        IGameImageService gameImageService)
 {
     _gamesService     = gamesService;
     _gameImageService = gameImageService;
 }
Example #7
0
        /// <summary>
        /// Initializes new instance of GamesViewModel
        /// </summary>
        public GamesViewModel(INavigationService navigation, IGamesService gamesService, IGameImageService gameImageService, ICartService cartService)
        {
            this.navigation = navigation;
            this.gamesService = gamesService;
            this.gameImageService = gameImageService;
            this.cartService = cartService;

            gamesCollection = new ObservableCollection<Game>();

            title = "Find games";
            GameDetailsVisible = false;
            PreviousButtonVisible = false;
            GoForwardButtonVisible = false;

            if (!String.IsNullOrEmpty(GameStore.WindowsApp.Common.UserInfo.Username))
                ShowUserLogged = true;

            // Notify when user name is changed
            GameStore.WindowsApp.Common.UserInfo.OnUserNameChange += () =>
            {
                if (String.IsNullOrEmpty(GameStore.WindowsApp.Common.UserInfo.Username))
                    ShowUserLogged = false;
                else
                    ShowUserLogged = true;
            };
        }
 public GameImageController(IGameImageService service)
 {
     this.service = service;
 }