public override void OnAfterDelete() { EndGame(true); if (m_PBScoreBoard != null) { m_PBScoreBoard.Delete(); } /* if( m_Timer != null ) * m_Timer.Stop(); */ if (Announcers != null) { for (int i = 0; i < Announcers.Count; ++i) { Mobile mob; if (Announcers[i] is Mobile) { mob = Announcers[i] as Mobile; Announcers.Remove(mob); mob.Delete(); } } } base.OnAfterDelete(); }
/// <summary> /// Removes any trace of volatile information that could taint the behaivour in an disconnected state. /// </summary> private void Clear() { Information.Clear(); Statistics.Clear(); Synchronization.Clear(); Announcers.RemoveAll(); Folders.RemoveAll(); Errors.RemoveAll(); ConnectedEndpoint = null; }
public override void StopListening() { base.StopListening(); lock (this.Announcers) { foreach (var announcer in Announcers.Keys) { announcer.Shutdown(); } Announcers.Clear(); } }