Beispiel #1
0
        private void Stop2()
        {
            try
            {
                if (turnServer != null)
                {
                    turnServer.Stop();
                    turnServer = null;
                }

                if (wcfService != null)
                {
                    wcfService.NewConfigurationSetted -= WcfService_NewConfigurationSetted;
                    wcfService.Dispose();
                    wcfService = null;
                }

                AppDomain.CurrentDomain.UnhandledException -= CurrentDomain_UnhandledException;
            }
            catch (Exception ex)
            {
                WriteLogEntry("Error ocurs while stoping: " + ex.ToString(), EventLogEntryType.Error);
            }
        }