示例#1
0
        public void CloseService()
        {
            XMLLogger.WriteLocalActivity("Closing Application...");

            _GarbageCollectorTimer.Enabled = false;

            try
            {
                if (this.isRemoteServiceStarted == true)
                {
                    _remoteHost.Close();
                }

                if (this.isRemoteConnected == true)
                {
                    _remoteChannel.Close();
                }

                if (this.isLocalConnected == true)
                {
                    _crs.Close();
                    _customResolver.Close();
                }

                StopService(); //Calls the base.StopService method
            }
            catch (Exception e)
            {
                XMLLogger.WriteErrorMessage(this.GetType().FullName.ToString(), "App Fault on Exit");
            }
        }