| 381 | } |
| 382 | |
| 383 | void PluginManager::Initialize(ConfigFactory factory) |
| 384 | { |
| 385 | sFactory = move(factory); |
| 386 | |
| 387 | // Always load the registry first |
| 388 | Load(); |
| 389 | |
| 390 | // And force load of setting to verify it's accessible |
| 391 | GetSettings(); |
| 392 | |
| 393 | auto &mm = ModuleManager::Get(); |
| 394 | mm.DiscoverProviders(); |
| 395 | for (auto& [id, module] : mm.Providers()) { |
| 396 | RegisterPlugin(module.get()); |
| 397 | // Allow the module to auto-register children |
| 398 | module->AutoRegisterPlugins(*this); |
| 399 | } |
| 400 | |
| 401 | InitializePlugins(); |
| 402 | } |
| 403 | |
| 404 | void PluginManager::Terminate() |
| 405 | { |
nothing calls this directly
no test coverage detected