コード例 #1
0
 public PaymentHistoryApplicationService(IAccountClient accountClient, IHttpContextProvider iHttpContextProvider, IPaymentHistoryClient paymentHistoryClient, IMapper mapper)
 {
     _paymentHistoryClient = paymentHistoryClient;
     _iHttpContextProvider = iHttpContextProvider;
     _mapper        = mapper;
     _accountClient = accountClient;
 }
コード例 #2
0
 public AccountController(IAccountClient accountClient, IAccountTypeClient accountTypeClient, IApiClient apiClient, HttpClient httpClient)
 {
     _httpClient        = httpClient;
     _accountClient     = accountClient;
     _accountTypeClient = accountTypeClient;
     _apiClient         = apiClient;
 }
コード例 #3
0
        public AccountService(IAccountClient accountClient, IOptions <AuthServiceSettings> authServiceSettings)
        {
            _accountClient = accountClient;

            if (authServiceSettings.Value != null)
            {
                _accountClient.ConfigureClient(authServiceSettings.Value.Url);
            }
        }
コード例 #4
0
        /// <summary>
        /// Creates a new <see cref="Gw2WebApiV2Client"/>.
        /// </summary>
        /// <param name="connection">The connection used to make requests, see <see cref="IConnection"/>.</param>
        /// <param name="gw2Client">The Guild Wars 2 client.</param>
        /// <exception cref="ArgumentNullException"><paramref name="connection"/> or <paramref name="gw2Client"/> is <c>null</c>.</exception>
        protected internal Gw2WebApiV2Client(IConnection connection, IGw2Client gw2Client)
            : base(connection, gw2Client)
        {
            if (connection == null)
            {
                throw new ArgumentNullException(nameof(connection));
            }
            if (gw2Client == null)
            {
                throw new ArgumentNullException(nameof(gw2Client));
            }

            this.account        = new AccountClient(connection, gw2Client);
            this.achievements   = new AchievementsClient(connection, gw2Client);
            this.backstory      = new BackstoryClient(connection, gw2Client);
            this.build          = new BuildClient(connection, gw2Client);
            this.characters     = new CharactersClient(connection, gw2Client);
            this.colors         = new ColorsClient(connection, gw2Client);
            this.commerce       = new CommerceClient(connection, gw2Client);
            this.continents     = new ContinentsClient(connection, gw2Client);
            this.createSubtoken = new CreateSubtokenClient(connection, gw2Client);
            this.currencies     = new CurrenciesClient(connection, gw2Client);
            this.dailyCrafting  = new DailyCraftingClient(connection, gw2Client);
            this.dungeons       = new DungeonsClient(connection, gw2Client);
            this.emblem         = new EmblemClient(connection, gw2Client);
            this.emotes         = new EmotesClient(connection, gw2Client);
            this.files          = new FilesClient(connection, gw2Client);
            this.finishers      = new FinishersClient(connection, gw2Client);
            this.gliders        = new GlidersClient(connection, gw2Client);
            this.guild          = new GuildClient(connection, gw2Client);
            this.home           = new HomeClient(connection, gw2Client);
            this.items          = new ItemsClient(connection, gw2Client);
            this.itemstats      = new ItemstatsClient(connection, gw2Client);
            this.legends        = new LegendsClient(connection, gw2Client);
            this.mailCarriers   = new MailCarriersClient(connection, gw2Client);
            this.mapChests      = new MapChestsClient(connection, gw2Client);
            this.maps           = new MapsClient(connection, gw2Client);
            this.masteries      = new MasteriesClient(connection, gw2Client);
            this.materials      = new MaterialsClient(connection, gw2Client);
            this.minis          = new MinisClient(connection, gw2Client);
            this.mounts         = new MountsClient(connection, gw2Client);
            this.novelties      = new NoveltiesClient(connection, gw2Client);
            this.outfits        = new OutfitsClient(connection, gw2Client);
            this.pets           = new PetsClient(connection, gw2Client);
            this.professions    = new ProfessionsClient(connection, gw2Client);
            this.pvp            = new PvpClient(connection, gw2Client);
            this.quaggans       = new QuaggansClient(connection, gw2Client);
            this.quests         = new QuestsClient(connection, gw2Client);
            this.races          = new RacesClient(connection, gw2Client);
            this.raids          = new RaidsClient(connection, gw2Client);
            this.recipes        = new RecipesClient(connection, gw2Client);
            this.skills         = new SkillsClient(connection, gw2Client);
            this.tokenInfo      = new TokenInfoClient(connection, gw2Client);
            this.worldBosses    = new WorldBossesClient(connection, gw2Client);
        }
コード例 #5
0
 public AccountApplicationService(IAccountLocationClient accountLocationClient, IPaymentHistoryApplicationService paymentHistoryApplicationService, ITaxableStateClient taxableStateClient, IAccountClient accountClient, ISensorClient sensorClient, IGatewayClient gatewayClient, INetworkClient networkClient, IMapper mapper)
 {
     _sensorClient       = sensorClient;
     _taxableStateClient = taxableStateClient;
     _accountClient      = accountClient;
     _networkClient      = networkClient;
     _gatewayClient      = gatewayClient;
     _mapper             = mapper;
     _paymentHistoryApplicationService = paymentHistoryApplicationService;
     _accountLocationClient            = accountLocationClient;
 }
コード例 #6
0
 public TransactionController(IAccountClient accountClient,
                              IAccountingPeriodClient accountingPeriodClient,
                              IAssetTypeClient assetTypeClient,
                              IApiClient apiClient,
                              HttpClient httpClient,
                              IDepositClient depositClient
                              )
 {
     _httpClient             = httpClient;
     _accountClient          = accountClient;
     _accountingPeriodClient = accountingPeriodClient;
     _assetTypeClient        = assetTypeClient;
     _apiClient     = apiClient;
     _depositClient = depositClient;
 }
コード例 #7
0
ファイル: GeniusClient.cs プロジェクト: rhatton33/Genius.NET
        /// <summary>
        /// Start by making an instance of GeniusClient.
        /// </summary>
        /// <param name="apiKey">See: http://genius.com/api-clients"</param>
        public GeniusClient(string apiKey)
        {
            // Initialize Genius Client
            IGeniusRestClient geniusHttpClient = GeniusRestClient.Instance;

            geniusHttpClient.SetApiKey(apiKey);

            // Inject all the necessary client services
            AccountClient    = new AccountClient(geniusHttpClient);
            AnnotationClient = new AnnotationClient(geniusHttpClient);
            ReferentClient   = new ReferentClient(geniusHttpClient);
            SongClient       = new SongClient(geniusHttpClient);
            ArtistClient     = new ArtistClient(geniusHttpClient);
            SearchClient     = new SearchClient(geniusHttpClient);
            WebPageClient    = new WebPageClient(geniusHttpClient);
        }
コード例 #8
0
        private void EditPortfolioButtonClicked(object sender, RoutedEventArgs e)
        {
            //QuickArbitrage.Connection.TransferTest.StreamFileTest.WriteCustomer("e:\\cus.bin");
            IAccountClient client = QuickArbitrage.Connection.ClientFactory.Instance.GetAccountClient();

            client.Login("0240050002", "888888", new LoginCallback(
                             (succ, msg) => {
                if (succ)
                {
                    MessageBox.Show("Login Succeeded");
                }
                else
                {
                    MessageBox.Show("Login Failed");
                }
            }));
        }
コード例 #9
0
        public async Task <bool> LoadUserCache(IAccountClient accountClient, IMemoryCache cache, string username)
        {
            //lock (_mainDataCacheLock)
            {
                UserInfoViewModel model = await GetUserInfoViewModel(accountClient, username);

                // Set cache options.
                var cacheEntryOptions = new MemoryCacheEntryOptions()
                                        // Keep in cache for this time, reset time if accessed.
                                        .SetSlidingExpiration(TimeSpan.FromSeconds(_cacheTimeOut));

                // Save data in cache.
                cache.Remove($"{_userinfoViewModelKey}{username}");
                cache.Set($"{_userinfoViewModelKey}{username}", model, cacheEntryOptions);

                return(true);
            }
        }
コード例 #10
0
        private async Task <UserInfoViewModel> GetUserInfoViewModel(IAccountClient accountClient, string username)
        {
            var model  = new UserInfoViewModel();
            var result = await accountClient.GetUserInfo(username);

            if (result.StatusIsSuccessful)
            {
                model.UserName = result.Data.UserName;
                model.Email    = result.Data.Email;

                model.IsAdmin     = result.Data.IsAdmin;
                model.IsLibrarian = result.Data.IsLibrarian;

                model.Settings  = result.Data.Settings;
                model.RoleList  = result.Data.RoleList;
                model.UserRoles = result.Data.UserRoles;
            }

            return(model);
        }
コード例 #11
0
 public RegistrationController(IAccountClient accountClient, IConfiguration configuration)
 {
     _accountClient = accountClient;
     _configuration = configuration;
 }
コード例 #12
0
 public HomeController(ILogger <HomeController> logger, IProductClient productClient, IAccountClient accountClient)
 {
     this._accountClient = accountClient;
     _logger             = logger;
     _productClient      = productClient;
 }
コード例 #13
0
 public PasswordResetController(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #14
0
 public FollowersController(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #15
0
 public void Init()
 {
     _stripe = Substitute.For<IStripeClient>();
     _client = new AccountClient(_stripe);
 }
コード例 #16
0
 public AccountController(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #17
0
 public ProfileController(IAccountClient accountClient, IPostService postService)
 {
     _accountClient = accountClient;
     _postService   = postService;
 }
コード例 #18
0
 public PopularUserComponent(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #19
0
        public static async Task <Site> GetDefaultSiteAsync(this IAccountClient client)
        {
            var sites = await client.ListSitesAsync();

            return(sites.FirstOrDefault());
        }
コード例 #20
0
 public UserCache(IAccountClient accountClient, IMemoryCache cache, ITokenContainer tokenContainer)
 {
     _accountClient  = accountClient;
     _cache          = cache;
     _tokenContainer = tokenContainer;
 }
コード例 #21
0
 public AccountController(IAccountClient accountClient, IOrderClient orderClient)
 {
     this._orderClient   = orderClient;
     this._accountClient = accountClient;
 }
コード例 #22
0
 public AccountStateProvider(IAccountClient client)
 {
     _client = client;
     _state  = new AccountState();
 }
コード例 #23
0
 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;
 }
コード例 #24
0
 public EmailConfirmationController(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #25
0
 public void Init()
 {
     _stripe = Substitute.For <IStripeClient>();
     _client = new AccountClient(_stripe);
 }
コード例 #26
0
 public CommonController(IPictureService pictureService, IPostService postService, IAccountClient accountClient)
 {
     _pictureService = pictureService;
     _postService    = postService;
     _accountClient  = accountClient;
 }
コード例 #27
0
 public static Task <Application> AddApplication(this IAccountClient client, string name)
 {
     return(client.AddApplication(name, false));
 }
コード例 #28
0
 public ProfileIndexModel(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #29
0
 public SearchUserViewModel(IAccountClient accountClient)
 {
     _accountClient = accountClient;
 }
コード例 #30
0
 public HomeController(IPictureService pictureService, IAccountClient client, IPostService postService)
 {
     this._pictureService = pictureService;
     this._accountService = client;
     this._postService    = postService;
 }