Ejemplo n.º 1
0
 /// <summary>
 /// Initialize an instance of <see cref="PluginLoader" />
 /// </summary>
 /// <param name="config">The configuration for the plugin.</param>
 public PluginLoader(PluginConfig config)
 {
     _config  = config ?? throw new ArgumentNullException(nameof(config));
     _context = CreateLoadContext(config);
 }
Ejemplo n.º 2
0
 internal PluginLoader(PluginConfig config, string baseDir, Type[] sharedTypes)
 {
     _mainAssembly = Path.Combine(baseDir, config.MainAssembly.Name + ".dll");
     _context      = CreateLoadContext(baseDir, config, sharedTypes);
 }