private void Dispose(bool disposing) { if (disposing) { // dispose managed resources _host.Stop(); _host.Dispose(); } // dispose native resources } }