private static async Task EnrichWithEnabledPlugins(Server server, IPluginRepository pluginRepository, IPluginServerRepository pluginServerRepository) { if (server != null) { var pluginsServer = await pluginServerRepository.AllByServerId(server.Id); var plugins = new List <Plugin>(); foreach (var pluginServer in pluginsServer) { plugins.Add(await pluginRepository.Get(pluginServer.PluginId)); } server.EnabledPlugins = plugins.ToArray(); } }
public async Task <Plugin> Get(Guid id) => await _pluginRepository.Get(id);