Beispiel #1
0
        public PluginLoader(IServiceProvider serviceProvider, IPluginLoaderOptions options)
        {
            if (options is null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            this.serviceProvider = serviceProvider ?? new ServiceCollection().BuildServiceProvider();
            this.options         = options;
            this.plugins         = new Lazy <IEnumerable <IPlugin> >(InitializePlugins);
        }
Beispiel #2
0
 public PluginLoader(IPluginLoaderOptions options) :
     this(null, options)
 {
 }