Beispiel #1
0
        public void Stop()
        {
            try
            {
                CloseConnection();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                ServerConnect.Stop();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                ClientUDP.Close();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                ListenSocket.StopListening();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                LastCommonRouteFinder.StopFinder();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                UploadBandwidthThrottler.Stop();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                Preference.Save();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            try
            {
                ClientCredits.CleanUp();
            }
            catch (Exception ex)
            {
                MpdUtilities.DebugLogError("MuleApplication Stop Fail",
                                           ex);
            }

            if (ShutDownMuleApplication != null)
            {
                ShutDownMuleApplication(this, new EventArgs());
            }
        }