/// <summary> /// Initializes the <see cref="PluginManager"/> /// </summary> /// <param name="loader">Instance of the mod loader.</param> /// <param name="sharedContext">Used only for testing. Sets shared load context used for plugins.</param> public PluginManager(Loader loader, LoadContext sharedContext = null) { _loader = loader; LoaderApi = new LoaderAPI(_loader); _sharedContext = sharedContext ?? LoadContext.BuildSharedLoadContext(); }
/// <summary> /// Initializes the <see cref="PluginManager"/> /// </summary> /// <param name="loader">Instance of the mod loader.</param> public PluginManager(Loader loader) { _loader = loader; LoaderApi = new LoaderAPI(_loader); _loadContext = AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()); }