public GamesService(ILoginManager loginManager, AppDbContext dbContext, IEffectsService effectsService, ICardService cardInitializerService)
 {
     this.dbContext      = dbContext;
     this.effectsService = effectsService;
     this.cardService    = cardInitializerService;
     this.loginManager   = loginManager;
 }
Example #2
0
 public AccountController(UserManager <User> userManager, SignInManager <User> signInManager, IEmailService emailService, ICardService cardService)
 {
     _usermanager   = userManager;
     _signInManager = signInManager;
     _emailSender   = emailService;
     _cardService   = cardService;
 }
Example #3
0
        public AddRemoveVM(IEventAggregator eventAggregator, ICardService cardService, ISetService setService, ICubeService cubeService)
        {
            _eventAggregator = eventAggregator;
            _cardService     = cardService;
            _setService      = setService;
            _cubeService     = cubeService;

            _eventAggregator.GetEvent <AddCubeEvent>().Subscribe(OnAddCube);

            Sets        = new ObservableCollection <SetWrapper>(_setService.Sets);
            Cards       = new ObservableCollection <CardWrapper>(_cardService.Cards);
            Cubes       = new ObservableCollection <CubeWrapper>(_cubeService.GetCubes());
            SideOptions = new ObservableCollection <string> {
                "Corp", "Runner"
            };
            NumberOptions = new ObservableCollection <int> {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10
            };

            AddSetCommand     = new DelegateCommand(OnAddSet, OnAddSetCanExecute);
            AddCardCommand    = new DelegateCommand(OnAddCard, OnAddCardCanExecute);
            DeleteSetCommand  = new DelegateCommand(OnDeleteSet, OnDeleteSetCanExecute);
            DeleteCardCommand = new DelegateCommand(OnDeleteCard, OnDeleteCardCanExecute);
            DeleteCubeCommand = new DelegateCommand(OnDeleteCube, OnDeleteCubeCanExecute);
        }
 public CardsController(
     ICardService cardService,
     IValidatorService validatorService)
 {
     this.cardService      = cardService;
     this.validatorService = validatorService;
 }
Example #5
0
        public void SetUp()
        {
            _cardTipService = Substitute.For <ICardTipService>();
            _cardService    = Substitute.For <ICardService>();

            _sut = new CardTipsProcessorStrategy(_cardService, _cardTipService);
        }
Example #6
0
 public PurchaseController(IPurchaseService purchaseService, IShopService shopService, ICurrentUser currentUser, ICardService cardService)
 {
     _purchaseService = purchaseService;
     _shopService     = shopService;
     _currentUser     = currentUser;
     _cardService     = cardService;
 }
Example #7
0
 public GamePlayApiController(IUserService userService, ICardService cardService, IGamePlayService gamePlayService, IMoveService moveService)
     : base(userService)
 {
     _cardService     = cardService;
     _gamePlayService = gamePlayService;
     _moveService     = moveService;
 }
 public CardDataConsumerHandler(ICardService cardService, IMediator mediator, ICardCommandMapper cardCommandMapper, ILogger <CardDataConsumerHandler> logger)
 {
     _cardService       = cardService;
     _mediator          = mediator;
     _cardCommandMapper = cardCommandMapper;
     _logger            = logger;
 }
 public HomeController(IUserService userService, IDeckService deckService, ICardService cardService, ILanguageService languageService)
 {
     _userService     = userService;
     _deckService     = deckService;
     _cardService     = cardService;
     _languageService = languageService;
 }
Example #10
0
 public CardTests(TinyBankFixture fixture)
 {
     _dbContext = fixture.DbContext;
     _cards     = fixture.GetService <ICardService>();
     _accounts  = fixture.GetService <IAccountService>();
     _customers = fixture.GetService <ICustomerService>();
 }
        public AdManager(
            IAdService adService,
            ICardService cardService,
            IAdImageService adImageService,
            IAddressService addressService,
            IOwnerService ownerService,
            IAdStatusService adStatusService,
            AddressManager addressManager,
            AdRegister adRegister,
            CardDetailDTOParser cardDetailDTOParser,
            AdImageDTOParser adImageDTOParser,
            CardRegisterDTOParser cardRegisterDTOParser
            )
        {
            this.adService       = adService;
            this.cardService     = cardService;
            this.adImageService  = adImageService;
            this.addressService  = addressService;
            this.ownerService    = ownerService;
            this.adStatusService = adStatusService;

            this.adRegister = adRegister;

            this.cardDetailDTOParser   = cardDetailDTOParser;
            this.adImageDTOParser      = adImageDTOParser;
            this.cardRegisterDTOParser = cardRegisterDTOParser;

            this.addressManager = addressManager;
        }
Example #12
0
        public async Task Invoke(HttpContext context, ICardService cardService)
        {
            var userId = context.Request.Cookies["identity"];

            if (string.IsNullOrEmpty(userId))
            {
                var domain = new Uri(_configuration["WebUrl"]).Host;
                userId = Guid.NewGuid().ToString();

                context.Response.Cookies.Append("identity", userId, new CookieOptions
                {
                    HttpOnly = true,
                    Domain   = domain,
                    Expires  = DateTimeOffset.MaxValue,
                    SameSite = SameSiteMode.Strict
                });

                await cardService.CreateEmptyCardAsync(userId);
            }

            var principal = new GenericPrincipal(new GenericIdentity(userId), Array.Empty <string>());

            Thread.CurrentPrincipal = principal;
            context.User            = principal;

            await _next(context);
        }
Example #13
0
        public GamePlayService(
            IGameDeckCardCollectionRepository gameDeckCardCollectionRepository,
            IGameDeckRepository gameDeckRepository,
            IGameRepository gameRepository,
            IMoveRepository moveRepository,
            ITurnRepository turnRepository,
            IDataMapper <GameDeckCardCollectionData, GameDeckCardCollectionModel> gameDeckCardCollectionMapper,
            IDataMapper <GameDeckData, GameDeckModel> gameDeckMapper,
            ICardService cardService,
            IGameDataService gameDataService,
            IGameValidator gameValidator,
            IMoveValidator moveValidator
            )
        {
            _gameDeckCardCollectionRepository = gameDeckCardCollectionRepository;
            _gameDeckRepository = gameDeckRepository;
            _gameRepository     = gameRepository;
            _moveRepository     = moveRepository;
            _turnRepository     = turnRepository;

            _gameDeckCardCollectionMapper = gameDeckCardCollectionMapper;
            _gameDeckMapper = gameDeckMapper;

            _cardService     = cardService;
            _gameDataService = gameDataService;

            _gameValidator = gameValidator;
            _moveValidator = moveValidator;
        }
Example #14
0
 public CardsController(
     ILifetimeService lifetimeService,
     ICardService cardService)
 {
     _lifetimeService = lifetimeService;
     _cardService     = cardService;
 }
Example #15
0
        public GameService(
            IGameValidator gameValidator,
            IDeckRepository deckRepository,
            IGameDeckRepository gameDeckRepository,
            IGameRepository gameRepository,
            IGameUserRepository gameUserRepository,
            ITurnRepository turnRepository,
            IDataMapper <GameData, GameModel> gameMapper,
            IDataMapper <GameCreateData, GameCreateModel> gameCreateMapper,
            IDataMapper <GameDeckCardCollectionData, GameDeckCardCollectionModel> gameDeckCardCollectionMapper,
            IDataMapper <GameDeckData, GameDeckModel> gameDeckMapper,
            IDataMapper <GameUserData, GameUserModel> gameUserMapper,
            ICardService cardService
            )
        {
            _gameValidator = gameValidator;

            _deckRepository     = deckRepository;
            _gameDeckRepository = gameDeckRepository;
            _gameRepository     = gameRepository;
            _gameUserRepository = gameUserRepository;
            _turnRepository     = turnRepository;

            _gameMapper                   = gameMapper;
            _gameCreateMapper             = gameCreateMapper;
            _gameDeckCardCollectionMapper = gameDeckCardCollectionMapper;
            _gameDeckMapper               = gameDeckMapper;
            _gameUserMapper               = gameUserMapper;

            _cardService = cardService;
        }
Example #16
0
        /// <summary>
        /// Using the Muiltverse id to find a card for the magic api wrapper.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <ActionResult <Card> > GetCardById(int id)
        {
            ICardService service = serviceProvider.GetCardService();
            var          result  = await service.FindAsync(id);

            if (result.IsSuccess)
            {
                var value  = result.Value;
                int attack = 0;
                int.TryParse(value.Power, out attack);
                int defense = 0;
                int.TryParse(value.Toughness, out defense);
                Card card = new Card()
                {
                    cardId        = (int)value.MultiverseId,
                    cardName      = value.Name,
                    cardClass     = value.Type,
                    attackNumber  = attack,
                    defenceNumber = defense,
                    imageURL      = value.ImageUrl.ToString()
                };

                return(card);
            }
            else
            {
                var exception = result.Exception;
                return(null);
            }
        }
 public DownloadCardDetailSWDestinyDBExecutor(IDownloadCardDetailSWDestinyDBExtractor extractor,
                                              ICardService cardService)
 {
     _extractor   = extractor;
     _cardService = cardService;
     webClient    = new WebClient();
 }
Example #18
0
        /// <summary>
        /// Getting the info we want from and storing it in a card to send back.
        /// If nothing is found than a empty card is returned
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public async Task <ActionResult <Card> > GetCardByName(string name)
        {
            ICardService service = serviceProvider.GetCardService();
            var          result  = await service.Where(x => x.Name, name).AllAsync();

            var  temp = result.Value;
            Card card = new Card();

            foreach (var i in temp)
            {
                if (i.Name == name)
                {
                    int attack = 0;
                    int.TryParse(i.Power, out attack);
                    int defense = 0;
                    int.TryParse(i.Power, out defense);

                    card.cardId        = (int)i.MultiverseId;
                    card.cardName      = i.Name;
                    card.cardClass     = i.Type;
                    card.attackNumber  = attack;
                    card.defenceNumber = defense;
                    card.imageURL      = i.ImageUrl.ToString();
                }
            }

            return(card);
        }
Example #19
0
 private static void DisplayCurrentAccountBalance(ICardService service)
 {
     (long Account, double Balance)accountBalance = service.GetAccountBalance();
     Console.ForegroundColor = ConsoleColor.Green;
     Console.WriteLine($"Account : {accountBalance.Account} | Account Balance Amount : {accountBalance.Balance}");
     Console.ResetColor();
 }
Example #20
0
 private void ExtractFiles()
 {
     _cardDb  = ChickenContainer.Instance.Resolve <ICardService>();
     _bcardDb = ChickenContainer.Instance.Resolve <IBCardService>();
     _cardDb.Save(_cards);
     _bcardDb.Save(_cardBcards);
 }
Example #21
0
 public EventsController(
     ILotteryEventService eventService, ICardService cardService, IMapper mapper)
 {
     this.eventService = eventService;
     this.cardService  = cardService;
     this.mapper       = mapper;
 }
 public WebhooksController(
     IStripeService stripeService,
     IProjectInvoiceService invoiceService,
     IDisperseFundsService paidInvoiceService,
     IFinancialAccountService financialAccountService,
     ICardService cardService,
     IChargeService chargeService,
     ISourceService sourceService,
     IPaymentIntentService paymentIntentService,
     ISubscriptionService subscriptionService,
     ILogger <WebhooksController> logger,
     IOptions <AppSettings> appSettings,
     IBuyerAccountService buyerAccountService)
 {
     _logger                  = logger;
     _cardService             = cardService;
     _chargeService           = chargeService;
     _sourceService           = sourceService;
     _paymentIntentService    = paymentIntentService;
     _subscriptionService     = subscriptionService;
     _stripeService           = stripeService;
     _invoiceService          = invoiceService;
     _paidInvoiceService      = paidInvoiceService;
     _financialAccountService = financialAccountService;
     _appSettings             = appSettings;
     _buyerAccountService     = buyerAccountService;
     _logger                  = logger;
 }
Example #23
0
 public DepositController(UserManager <User> userManager, IUserBalanceService userBalanceService, ITransactionService transactionService, ICardService cardService)
 {
     this.userManager        = userManager;
     this.userBalanceService = userBalanceService;
     this.transactionService = transactionService;
     this.cardService        = cardService;
 }
 public ActionService(IReadWriteRepository <Action, StarWarsDestinyContext> repository,
                      IGameService gameService, ICardService cardService, IPlayerRoundService playerRoundService) : base(repository)
 {
     _gameService        = gameService;
     _cardService        = cardService;
     _playerRoundService = playerRoundService;
 }
        //private readonly RedisService _redisService;

        public CardCostController(ILogger <CardCostController> logger, ICardService cardService, IValidateCardNumber validateCardNumber /*, RedisService redisService*/)
        {
            _logger             = logger;
            _cardService        = cardService;
            _validateCardNumber = validateCardNumber;
            //_redisService = redisService;
        }
Example #26
0
 public AccountController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IEmailSender emailSender, ICardService cardService)
 {
     _signInManager = signInManager;
     _userManager   = userManager;
     _emailSender   = emailSender;
     _cardService   = cardService;
 }
Example #27
0
 public Game(ICardService cardService, INotificationFactory notificationFactory, string gameId)
 {
     _cardService         = cardService;
     _notificationFactory = notificationFactory;
     GameId = gameId;
     Task.Run(Setup).Wait();
 }
Example #28
0
 public PackagePageViewModel(IPackageService packageService, ICardService cardService, INavigationService navigationService, IToastService toastService)
 {
     this.packageService    = packageService;
     this.cardService       = cardService;
     this.navigationService = navigationService;
     this.toastService      = toastService;
 }
Example #29
0
 public GamePipelineService(IGameService gameService, IDeckService deckService,
                            ICardService cardService)
 {
     _gameService = gameService;
     _deckService = deckService;
     _cardService = cardService;
 }
 public CardApplicationIntegrationTests()
 {
     _dbConfigString = Environment.GetEnvironmentVariable("CardApplicationConnectionString");
     _dbConnection   = new MySqlConnection(_dbConfigString);
     _cardRepository = new CardRepository(_dbConnection);
     _cardService    = new CardService(_cardRepository, _mapper.Object);
 }
        protected override void SetContext()
        {
            _mocks = new RhinoAutoMocker<CardReadyAction>();
            _action = _mocks.ClassUnderTest;

            _cardService = _mocks.Get<ICardService>();
            _card = _mocks.Get<Kokugen.Core.Domain.Card>();
        }
 public HomeController(ICardService cardService)
 {
     _cardService = cardService;
 }
Example #33
0
 public CardMovedAction(ICardService cardService, IBoardService boardService)
 {
     _cardService = cardService;
     _boardService = boardService;
 }
Example #34
0
 public ListAction(ICardService cardService, IProjectService projectService)
 {
     _cardService = cardService;
     _projectService = projectService;
 }
 public CardController(ICardService cardService)
 {
     _cardService = cardService;
 }
 public CartService(ICartRepository cartRepository, ICardService cardService)
 {
     _cartRepository = cartRepository;
     _cardService = cardService;
 }
Example #37
0
 public CardClaimAction(ICardService cardService, IUserService userService, ISecurityContext securityContext)
 {
     _cardService = cardService;
     _userService = userService;
     _securityContext = securityContext;
 }
Example #38
0
 public HomeController(ICardService service)
 {
     _service = service;
 }
Example #39
0
 public CardReadyAction(ICardService cardService)
 {
     _cardService = cardService;
 }
		public CardsController(IMappingEngine mappingEngine,
			ICardService cardService)
		{
			_mappingEngine = mappingEngine;
			_cardService = cardService;
		}
 public CardController(ICardService cardService)
 {
     this.cardService = cardService;
 }
Example #42
0
 public TaskAction(ITaskService taskService, ICardService cardService)
 {
     _taskService = taskService;
     _cardService = cardService;
 }
 public CardsController(ICardService service)
 {
     _service = service;
 }
Example #44
0
 public AddAction(ICardService cardService)
 {
     _cardService = cardService;
 }
Example #45
0
 public ColorAction(ICardService cardService)
 {
     _cardService = cardService;
 }
Example #46
0
 public CardServiceTest()
 {
     _cardService = new CardService(AccountModel);
 }
Example #47
0
 public ReOrderAction(ICardService cardService)
 {
     _cardService = cardService;
 }
Example #48
0
 public GetAction(ICardService cardService)
 {
     _cardService = cardService;
 }