Exemplo n.º 1
0
 internal BungieClient(
     IConfigurationService config,
     ILogger logger,
     IBungieApiAccess apiAccess,
     IHttpClientInstance httpClient,
     IAuthorizationStateHandler authorizationHandler,
     ILocalisedDestinyDefinitionRepositories repository)
 {
     _configuration = config;
     _httpClient    = httpClient;
     _logger        = logger;
     Authentication = authorizationHandler;
     Repository     = repository;
     ApiAccess      = apiAccess;
     _logListener   = new LogListener();
     _logger.Register(_logListener);
 }
Exemplo n.º 2
0
 public BungieClient(
     ILogger logger,
     IBungieApiAccess apiAccess,
     IAuthorizationHandler authorizationHandler,
     IDestiny2DefinitionRepository repository,
     IDefinitionProvider definitionProvider,
     IDestiny2ResetService destiny2ResetService,
     BungieClientConfiguration configuration,
     IServiceProvider serviceProvider)
 {
     _logger            = logger;
     ResetService       = destiny2ResetService;
     _configuration     = configuration;
     Authentication     = authorizationHandler;
     Repository         = repository;
     ApiAccess          = apiAccess;
     DefinitionProvider = definitionProvider;
     ServiceProviderInstance.Instance = serviceProvider;
 }
 internal UserContextBungieClient(
     IDestiny2DefinitionRepository repository,
     AuthorizationTokenData token,
     IAuthorizationHandler authorizationHandler,
     IBungieApiAccess apiAccess)
 {
     Repository            = repository;
     TokenData             = token;
     _authorizationHandler = authorizationHandler;
     App              = new UserScopedAppMethodsAccess(apiAccess.App, TokenData);
     User             = new UserScopedUserMethodsAccess(apiAccess.User, TokenData);
     Trending         = new UserScopedTrendingMethodsAccess(apiAccess.Trending, TokenData);
     Tokens           = new UserScopedTokenMethodsAccess(apiAccess.Tokens, TokenData);
     Misc             = new UserScopedMiscMethodsAccess(apiAccess.Misc);
     GroupV2          = new UserScopedGroupV2MethodsAccess(apiAccess.GroupV2, TokenData);
     Forum            = new UsedScopedForumMethodsAccess(apiAccess.Forum, TokenData);
     Fireteam         = new UserScopedFireteamMethodsAccess(apiAccess.Fireteam, TokenData);
     Content          = new UserScopedContentMethodsAccess(apiAccess.Content, TokenData);
     CommunityContent = new UserScopedCommunityContentMethodsAccess(apiAccess.Community);
     Destiny2         = new UserScopedDestiny2MethodsAccess(apiAccess.Destiny2, TokenData);
 }