public SteamClientTests(Fixtures.SteamClientFixture steamClientFixture, Fixtures.UserSecretsFixture userSecretsFixture) { _steamClient = Guard.Argument(steamClientFixture).NotNull() .Wrap(f => f.SteamClient).NotNull().Value; _steamIds = Guard.Argument(userSecretsFixture).NotNull() .Wrap(f => f.SteamIds).NotNull().NotEmpty().DoesNotContainNull().DoesNotContainDuplicate().Value; }
public ReviewsRunnable(ILogger <CommunityRunnable> logger, ISeenItemRepository seenItemRepository, HttpClient httpClient, Function.FunctionConfig config, TranslationClient translation, ISteamClient steam) { this.logger = logger; this.slack = new SlackClient(new SlackConfig { WebHookUrl = config.EstrangedDiscordReviewsWebhook, HttpClient = httpClient }); this.seenItemRepository = seenItemRepository; this.translation = translation; this.steam = steam; }
public void SteamClientIsNull_ThrowsArgumentNullException() { // Arrange steamClient = null; // Act -> Assert Assert.Throws <ArgumentNullException>(() => { new SteamClientAdapter(steamClient, manager); }); }
public DiscordRunner(ILogger <DiscordRunner> logger, ILoggerFactory loggerFactory, HttpClient httpClient, TranslationClient translationClient, LanguageServiceClient languageServiceClient, IGitHubClient gitHubClient, ISteamClient steamClient) { this.logger = logger; responderProvider = new ServiceCollection() .AddSingleton(loggerFactory) .AddLogging() .AddSingleton(httpClient) .AddSingleton(translationClient) .AddSingleton(languageServiceClient) .AddSingleton(gitHubClient) .AddSingleton(steamClient) .AddSingleton <IResponder, LocalizationResponder>() .AddSingleton <IRateLimitingRepository, RateLimitingRepository>() .AddSingleton <IAmazonDynamoDB>(new AmazonDynamoDBClient(RegionEndpoint.EUWest1)) .AddSingleton <IDiscordClient, DiscordSocketClient>() .AddSingleton <IResponder, DadJokeResponder>() .AddSingleton <IResponder, PullTheLeverResponder>() .AddSingleton <IResponder, EnglishTranslationResponder>() .AddSingleton <IResponder, TranslationResponder>() .AddSingleton <IResponder, NaturalLanguageResponder>() .AddSingleton <IResponder, DogResponder>() .AddSingleton <IResponder, HelloResponder>() .AddSingleton <IResponder, QuoteResponder>() .AddSingleton <IResponder, RtxResponder>() .AddSingleton <IResponder, TwitchResponder>() .AddSingleton <IResponder, SteamGameResponder>() .AddSingleton <IResponder, SobResponder>() .AddSingleton <IResponder, RepeatPhraseResponder>() .BuildServiceProvider(); }
public Values2Controller(ISteamClient steamClient) { _steamClient = steamClient; }
public ContentDownloader( ISettings settings, ISteamClient steamClient, ILogger <ContentDownloader> contentDownloader) : this(steamClient, settings.ModsDirectory !,
public GameServerController(ISteamClient client, IOptionsSnapshot <SteamApiOptions> options, ILoggerFactory logger) { this.steamOptions = options; this.logger = logger.CreateLogger <GameServerController>(); this.steamClient = client; }
public GameWorker(BotRepository botRepository, ILogger logger, ISteamClient steamClient) { this.botRepository = botRepository; this.logger = logger; this.steamClient = steamClient; }
public async Task <ActionResult <string> > Get([FromQuery] int limit = 100) { ISteamClient proxy = RestService.For <ISteamClient>(Configuration["SteamApiOptions:BaseUrl"]); return(await proxy.GetServerList(Configuration["SteamApiOptions:DeveloperApiKey"], limit)); }
internal SteamClientAdapter(ISteamClient steamClient, ICallbackManager manager, ILog log) { this.steamClient = steamClient ?? throw new ArgumentNullException(nameof(steamClient)); this.manager = manager ?? throw new ArgumentNullException(nameof(manager)); this.log = log ?? Log; }
/// <summary> /// Initializes a new instance of the <see cref="SteamClientAdapter"/> class. /// </summary> /// <param name="steamClient"> /// The Steam client. /// </param> /// <param name="manager"> /// The callback manager associated with <paramref name="steamClient"/>. /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="steamClient"/> is null. /// </exception> /// <exception cref="ArgumentNullException"> /// <paramref name="manager"/> is null. /// </exception> public SteamClientAdapter(ISteamClient steamClient, ICallbackManager manager) : this(steamClient, manager, null) { }
public SteamGameResponder(ILogger <SteamGameResponder> logger, ISteamClient steamClient) { _steamList = new Lazy <Task <IReadOnlyList <SteamAppSummary> > >(() => steamClient.GetAppList(CancellationToken.None)); _logger = logger; _steamClient = steamClient; }
public ManifestDownloader(ISteamClient steamClient, ILogger <ManifestDownloader> logger) { _steamClient = steamClient; _logger = logger; }
public PantherController(ISteamClient steamClient) { _steamClient = steamClient; }
public SteamService(ISteamClient steamClient, ISteamRepository steamRepository) { _steamClient = steamClient; _steamRepository = steamRepository; }
public SteamAchievementBuilder(ISteamClient steamClient, ISteamRepository steamRepository) { _steamClient = steamClient; _steamRepository = steamRepository; }