Ejemplo n.º 1
0
 public GetServersHandler(ISteamApi steamApi, IMessageBusProxy mb, IRequestScopeLocator scopeLocator,
                          ISteamSessionLocator sessionLocator)
 {
     _steamApi       = steamApi;
     _mb             = mb;
     _scopeLocator   = scopeLocator;
     _sessionLocator = sessionLocator;
 }
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 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)));
 }
Ejemplo n.º 4
0
 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;
         }
     }
 }
Ejemplo n.º 5
0
        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);
                }
            }
        }
Ejemplo n.º 6
0
 public GetServersSession(ISteamApi steamApi, IMessageBusProxy mb, IRequestScope scope,
                          ISteamSessionLocator sessionLocator) : base(mb, scope, sessionLocator)
 {
     _steamApi = steamApi;
 }