Ejemplo n.º 1
0
        public static void close()
        {
            try
            {
                if (_nchost != null)
                {
                    if (_nchost.HostServer != null)
                    {
                        _nchost.HostServer.Dispose();
                    }
                }

                if (_socketServer != null)
                {
                    _socketServer.Stop();
                }
                if (_managementSocketServer != null)
                {
                    _managementSocketServer.Stop();
                }
                if (_nchost != null)
                {
                    _nchost.StopHosting();
                    _nchost = null;
                }
                CacheServer.ReleaseServiceObject();
                AppUtil.LogEvent(_applicationName, "Cache [ " + cacheName + " ] separate process is stopped successfully.", EventLogEntryType.Information, EventCategories.Information, EventID.GeneralInformation);
            }
            catch (Exception ex)
            {
                AppUtil.LogEvent(_applicationName, "Cache [ " + cacheName + " ] Error: " + ex.ToString(), EventLogEntryType.Error, EventCategories.Error, EventID.GeneralError);
            }
        }