Exemplo n.º 1
0
 protected virtual void ListenToUncaughtExceptions(IThreadPool4 threadPool)
 {
     if (null == threadPool)
     {
         return;
     }
     // mocks don't have thread pools
     threadPool.UncaughtException += new _IEventListener4_42(this).OnEvent;
 }
Exemplo n.º 2
0
        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);
		}
Exemplo n.º 4
0
 /// <exception cref="System.Exception"></exception>
 private void CloseServer()
 {
     if (null != _server)
     {
         IThreadPool4 serverThreadPool = ServerThreadPool();
         _server.Close();
         _server = null;
         if (null != serverThreadPool)
         {
             serverThreadPool.Join(ThreadpoolTimeout);
         }
     }
 }
Exemplo n.º 5
0
 /// <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();
 }