示例#1
0
        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();
            }
        }
示例#2
0
 public async Task <Plugin> Get(Guid id) => await _pluginRepository.Get(id);