private HelpServer GetServer() { if (_server == null) { var env = (INiEnv)GetService(typeof(INiEnv)); string workDirectory = Path.Combine(env.FileSystemRoot, "Cache", "Help"); Directory.CreateDirectory(workDirectory); _server = new HelpServer(); _server.Manager.Resolve += Manager_Resolve; _server.Manager.Registrations.AddRange(_registrations); _searchManager = new HelpSearchManager(_server.Manager, workDirectory); } return _server; }
protected override void Dispose(bool disposing) { if (!_disposed && disposing) { if (_form != null) { _form.Dispose(); _form = null; } if (_server != null) { _server.Dispose(); _server = null; } if (_searchManager != null) { _searchManager.Dispose(); _searchManager = null; } _disposed = true; } base.Dispose(disposing); }