示例#1
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && MonitoringServer != null)
     {
         MonitoringServer.Dispose();
     }
 }
示例#2
0
        /// <summary>
        /// Stops mail server.
        /// </summary>
        public void Stop()
        {
            // Server isn't running, so do nothing.
            if (!m_Running)
            {
                return;
            }

            m_pSettingsTimer.Enabled = false;

            // Kill all running virtual servers
            foreach (VirtualServer server in m_pVirtualServers)
            {
                server.Stop();
            }
            m_pVirtualServers.Clear();

            // Kill management server
            m_pManagementServer.Dispose();
            m_pManagementServer = null;

            m_Running = false;

            // Logging stuff
            Logger.WriteLog(m_StartupPath + "Logs\\Server\\server.log", "//---- Server stopped " + DateTime.Now);
        }