Пример #1
0
        public void Stop()
        {
            if (readWorker != null)
            {
                workerRunning = false;
                readWorker?.Join();
                readWorker = null;
            }

            ipc?.Close();
            ipc = null;

            oscSrv?.Dispose();
            oscSrv = null;
        }
Пример #2
0
        private void OnIPCClientDisconnected(IPCServer pipe)
        {
            UnhookAll();

            _pluginProxy.Teardown();

            _ipcPipe.Close();

            if (_pluginAppDomain != null)
            {
                AppDomain.Unload(_pluginAppDomain);
                _pluginAppDomain = null;
            }

            //Notify the main thread that it is time to unload the dll.
            _unloadEvent.Set();
        }