Ejemplo n.º 1
0
 private async Task<List<ScriptMatchOrdersSummaryItem>> GetScriptMatchOrdersSummary(
     GameEnvironmentItem gameEnvironment, string script)
 {
     var serviceItems = await _client.GetScriptMatchOrdersSummaryAsync(gameEnvironment.GameEnvironment, script);
     return serviceItems.Select(a =>
         new ScriptMatchOrdersSummaryItem
         {
             ServerLogin = a.GameServer?.Login,
             ServerTitle = a.GameServer?.Name,
             MatchOrdersCount = a.MatchOrdersCount
         }).ToList();
 }
Ejemplo n.º 2
0
 private async Task<List<ServerFilterMatchOrdersSummaryItem>> GetServerFilterMatchOrdersSummary(
     GameEnvironmentItem gameEnvironment, string script, string serverLogin)
 {
     if (gameEnvironment == null)
     {
         return new List<ServerFilterMatchOrdersSummaryItem>();
     }
     var serviceItems = await _client.GetServerFilterMatchOrdersSummaryAsync(
         gameEnvironment.GameEnvironment, script, serverLogin);
     return serviceItems.Select(a => 
         new ServerFilterMatchOrdersSummaryItem
         {
             UserLogin = a.UserLogin,
             UserNick = a.UserNick,
             MinCount = a.PlayersMinCount
         }).ToList();
 }
Ejemplo n.º 3
0
 private async Task<Dictionary<string, int>> GetMatchOrdersSummary(GameEnvironmentItem gameEnvironmentItem)
 {
     if (gameEnvironmentItem == null)
     {
         return new Dictionary<string, int>();
     }
     return await _client.GetMatchOrdersSummaryAsync(gameEnvironmentItem.GameEnvironment);
 }
Ejemplo n.º 4
0
 private async Task<List<GameServer>> GetGameServers(GameEnvironmentItem gameEnvironmentItem, 
     string script, string serverLoginPart, int pageIndex)
 {
     if (gameEnvironmentItem == null)
     {
         return new List<GameServer>();
     }
     var result = await _client.GetGameServersAsync(
         gameEnvironmentItem.GameEnvironment, script, serverLoginPart, pageIndex);
     return result.ToList();
 }