private void ResolveLoginTasks() { foreach (Task <UserData.LoginResult> t in m_LoginTasks.Values.Where(x => x.IsCompleted)) { UserData.LoginResult result = t.Result; Chat.SendMessage(">> " + result.Result); if (result.RankedPlayer != null) { m_Context.AddPlayer(result.RankedPlayer); } } m_LoginTasks = m_LoginTasks .Where(kvp => !kvp.Value.IsCompleted) .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); }