public override void Unregister() { Log.Source.TraceInformation("Unregister module {0}", ModuleName); if (_ModuleHost == null) { ModuleLoader.RemoveModuleManager(this); return; } try { Log.Source.TraceInformation("Disconnect {0}", _ModuleHost); _ModuleHost.Disconnect(); } catch (Exception ex) { Far.Api.ShowError("ERROR: module " + _ModuleHost, ex); } finally { _ModuleHost = null; ModuleLoader.RemoveModuleManager(this); } }