protected virtual void ListenToUncaughtExceptions(IThreadPool4 threadPool) { if (null == threadPool) { return; } // mocks don't have thread pools threadPool.UncaughtException += new _IEventListener4_42(this).OnEvent; }
private void ListenToUncaughtExceptions() { ListenToUncaughtExceptions(ServerThreadPool()); IThreadPool4 clientThreadPool = ClientThreadPool(); if (null != clientThreadPool) { ListenToUncaughtExceptions(clientThreadPool); } }
protected virtual void ListenToUncaughtExceptions(IThreadPool4 threadPool) { if (null == threadPool) { return; } // mocks don't have thread pools threadPool.UncaughtException += new System.EventHandler<UncaughtExceptionEventArgs> (new _IEventListener4_42(this).OnEvent); }
/// <exception cref="System.Exception"></exception> private void CloseServer() { if (null != _server) { IThreadPool4 serverThreadPool = ServerThreadPool(); _server.Close(); _server = null; if (null != serverThreadPool) { serverThreadPool.Join(ThreadpoolTimeout); } } }
/// <exception cref="System.Exception"></exception> public override void Close() { if (null != _objectContainer) { IThreadPool4 clientThreadPool = ClientThreadPool(); _objectContainer.Close(); _objectContainer = null; if (null != clientThreadPool) { clientThreadPool.Join(ThreadpoolTimeout); } } CloseServer(); }