(id: number, enabled: boolean)
| 38 | } |
| 39 | |
| 40 | public EnablePlugin(id: number, enabled: boolean) { |
| 41 | const plugin = this.FindPluginById(id); |
| 42 | |
| 43 | if (plugin === null || plugin.enabled === enabled) { |
| 44 | return; |
| 45 | } |
| 46 | |
| 47 | plugin.enabled = enabled; |
| 48 | |
| 49 | enabled ? |
| 50 | plugin.service.Start() : |
| 51 | plugin.service.Stop(); |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * @param orderMap contain plugins ids in new order |
nothing calls this directly
no test coverage detected