Esempio n. 1
0
        public void postDeserializeInitialization()
        {
            if (!string.IsNullOrEmpty(this.SelectedTournamentId))
            {
                this.SelectedTournament = this.getInstanceOrNull(this.SelectedTournamentId);
            }
            else
            {
                this.SelectedTournament = null;
            }
            foreach (KeyValuePair <string, TournamentInstance> pair in this.ActiveInstances)
            {
                TournamentInstance instance = pair.Value;
                instance.Player = this.Player;
                instance.postDeserializeInitialization();
            }
            List <string> list = new List <string>();

            foreach (KeyValuePair <string, TournamentInstance> pair2 in this.ActiveInstances)
            {
                string key = pair2.Key;
                if (pair2.Value.CurrentState == TournamentInstance.State.CLEARED_FOR_REMOVAL)
                {
                    list.Add(key);
                }
            }
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i] == this.SelectedTournamentId)
                {
                    this.SelectedTournamentId = null;
                }
                this.ActiveInstances.Remove(list[i]);
            }
            if (!string.IsNullOrEmpty(this.LastUnselectedTournamentId) && !this.ActiveInstances.ContainsKey(this.LastUnselectedTournamentId))
            {
                this.LastUnselectedTournamentId = null;
            }
        }