Gwupe.Agent.GwupeClientAppContext.ExitThreadCore C# (CSharp) Method

ExitThreadCore() protected method

protected ExitThreadCore ( ) : void
return void
        protected override void ExitThreadCore()
        {
            this.IsShuttingDown = true;
            // before we exit, lets cleanup
            // Stop scheduled things from happening
            if (ScheduleManager != null)
                ScheduleManager.Close();
            // Logout and prevent trying to log back in
            if (LoginManager != null)
                LoginManager.Close();
            // Close up the engagements
            if (EngagementManager != null)
                EngagementManager.Close();
            // No more notifications
            if (NotificationManager != null)
                NotificationManager.Close();
            // Clear and close contact list
            if (RosterManager != null)
                RosterManager.Close();
            // No more searching
            if (SearchManager != null)
                SearchManager.Close();
            // Don't need service contact anymore
            if (GwupeServiceProxy != null)
                GwupeServiceProxy.close();
            // Connection can close
            if (ConnectionManager != null)
                ConnectionManager.Close();
            // Stop showing stuff
            if (UIManager != null)
                UIManager.Close();
            // Done
            Logger.Info("Gwupe.Agent has shut down");
            base.ExitThreadCore();
        }