public GetServersHandler(ISteamApi steamApi, IMessageBusProxy mb, IRequestScopeLocator scopeLocator, ISteamSessionLocator sessionLocator) { _steamApi = steamApi; _mb = mb; _scopeLocator = scopeLocator; _sessionLocator = sessionLocator; }
private Task Run(CancellationToken ct) { if (AppId == (uint) SteamGameIds.Arma3) { return SteamActions.PerformArmaSteamAction(async api => { SteamApi = api; await RunWebsite(ct).ConfigureAwait(false); }, (uint) SteamGameIds.Arma3, _steamSessionFactory); } SteamApi = new DummyApi(); return DoWithSteamSession(() => RunWebsite(ct)); }
private Task Run(CancellationToken ct) { if (AppId == (uint)SteamGameIds.Arma3) { return(SteamActions.PerformArmaSteamAction(async api => { SteamApi = api; await RunWebsite(ct).ConfigureAwait(false); }, (uint)SteamGameIds.Arma3, _steamSessionFactory)); } SteamApi = new DummyApi(); return(DoWithSteamSession(() => RunWebsite(ct))); }
private static async Task<IList<ArmaServerInfo>> PerformAction(ISteamApi steamApi, ServerFilterWrap filter) { using (var sb = await SteamActions.CreateServerBrowser(steamApi).ConfigureAwait(false)) { using (var cts = new CancellationTokenSource()) { var obs = await sb.GetServersInclDetails(cts.Token, filter, true) .ConfigureAwait(false); var s = await obs.Take(10).ToList(); cts.Cancel(); return s; } } }
private static async Task <IList <ArmaServerInfo> > PerformAction(ISteamApi steamApi, ServerFilterWrap filter) { using (var sb = await SteamActions.CreateServerBrowser(steamApi).ConfigureAwait(false)) { using (var cts = new CancellationTokenSource()) { var obs = await sb.GetServersInclDetails(cts.Token, filter, true) .ConfigureAwait(false); var s = await obs.Take(10).ToList(); cts.Cancel(); return(s); } } }
public GetServersSession(ISteamApi steamApi, IMessageBusProxy mb, IRequestScope scope, ISteamSessionLocator sessionLocator) : base(mb, scope, sessionLocator) { _steamApi = steamApi; }