/// <summary> /// Loads log plugins from the script, so errors are logged. /// </summary> /// <param name="script"> /// The script to load the imports from. /// </param> /// <param name="loggers"> /// The loggers collection to add the loggers to. /// </param> /// <param name="pluginResolver"> /// The plugin resolver to use. /// </param> public static void LoadLogPlugins(Block script, LoggerCollection loggers, [CanBeNull] IPluginResolver pluginResolver) { if (pluginResolver != null) { new PluginLoader(pluginResolver.EnumerateAvailablePlugins().ToArray(), loggers).Visit(script); } }
/// <summary> /// Initializes a new instance of the <see cref="FileConfigStore"/> class. /// </summary> /// <param name="configFileName"> /// The config file name. /// </param> /// <param name="pluginResolver"> /// The plugin resolver. /// </param> /// <param name="logger"> /// The logger. /// </param> public FileConfigStore(string configFileName, IPluginResolver pluginResolver, ILogger logger) : this() { this.ConfigFile = configFileName; this._pluginResolver = pluginResolver; this.Logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="PluginCollection"/> class. /// </summary> /// <param name="resolver"> /// The resolver. /// </param> public PluginCollection([CanBeNull] IPluginResolver resolver) { if (resolver is IDynamicPluginResolver dynamicResolver) { dynamicResolver.AvailablePluginsChanged += (o, e) => { this.IsLoading = dynamicResolver.IsLoading; this.plugins = dynamicResolver.EnumerateAvailablePlugins().ToArray(); this.AvailablePluginsChanged?.Invoke(this, e); }; this.IsLoading = dynamicResolver.IsLoading; } this.plugins = resolver?.EnumerateAvailablePlugins().ToArray() ?? new IConnectQlPlugin[0]; }
/// <summary> /// Initializes a new instance of the <see cref="ConnectQlContext" /> class. /// </summary> /// <param name="resolver"> /// The resolver. /// </param> public ConnectQlContext(IPluginResolver resolver) { this.PluginResolver = resolver; }
public PluginFactoryImpl(IProjectRepository projectRepository, IPluginResolver pluginResolver) { ProjectRepository = projectRepository; PluginResolver = pluginResolver; }