Beispiel #1
0
 private ClashRoyaleApiStandalone(IPlayerClient playerClient, IClanClient clanClient, ILocationClient locationClient, ITournamentClient tournamentClient, ICardClient cardClient)
 {
     PlayerClient     = playerClient;
     ClanClient       = clanClient;
     LocationClient   = locationClient;
     TournamentClient = tournamentClient;
     CardClient       = cardClient;
 }
        public BoardTestClientViewModel(IBoardClient boardClient, ICardClient cardClient)
            : base("Board")
        {
            this.boardClient = boardClient;
            this.cardClient  = cardClient;

            GetBoardAsyncCommand = new DelegateCommand(GetBoardAsyncCommandExecute);
        }
Beispiel #3
0
    // Use this for initialization
    async void Start()
    {
        ClientFactory.Log = Debug.Log;

        boardClient = ClientFactory.GetInstance <IBoardClient>();
        cardClient  = ClientFactory.GetInstance <ICardClient>();

        await Task.WhenAll(boardClient.ConnectAsync(HostName, Port), cardClient.ConnectAsync(HostName, Port));

        await GenerateBoardAsync();
    }
        /// <summary>
        /// Initializes a new instance of the <see cref="CardManager"/> class by
        /// a specified set of parameters.
        /// </summary>
        /// <param name="params">the instance of <see cref="CardManagerParams"/>. </param>
        public CardManager(CardManagerParams @params)
        {
            ValidateCardManagerParams(@params);
            this.CardCrypto          = @params.CardCrypto;
            this.AccessTokenProvider = @params.AccessTokenProvider;
            this.Client = string.IsNullOrWhiteSpace(@params.ApiUrl)
                ? new CardClient()
                : new CardClient(@params.ApiUrl);

            this.CardVerifier        = @params.Verifier;
            this.ModelSigner         = new ModelSigner(CardCrypto);
            this.SignCallBack        = @params.SignCallBack;
            this.RetryOnUnauthorized = @params.RetryOnUnauthorized;
        }
 public StressorService(ICardClient cardClient, ILogger <StressorService> logger)
 {
     _cardClient = cardClient;
     _logger     = logger;
 }
 public BalancedService(string key, IBalancedRest rest)
 {
     this.accountClient = new AccountClient(this, rest);
     this.bankClient = new BankAccountClient(this, rest);
     this.cardClient = new CardClient(this, rest);
     this.holdClient = new HoldClient(this, rest);
     this.creditClient = new CreditClient(this, rest);
     this.debitClient = new DebitClient(this, rest);
     this.refundClient = new RefundClient(this, rest);
     this.eventClient = new EventClient(this, rest);
     this.verificationClient = new VerificationClient(this, rest);
     this.marketplaceClient = new MarketplaceClient(this, rest);
     this.key = key;
 }