aboutsummaryrefslogtreecommitdiff
path: root/lib/Plugins.Runtime/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-04-12 21:18:05 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-04-12 21:18:05 -0400
commitde7860f1b91ec72a5d0e66aba7f7a7a04a87d038 (patch)
tree3468a0a25a0424486225cea963c7c357fa8f388e /lib/Plugins.Runtime/src
parent228e1b59a2fc24c2e4ce57aa8171a13a1a18c199 (diff)
RestSharp update, defer plugin configuration to consumer
Diffstat (limited to 'lib/Plugins.Runtime/src')
-rw-r--r--lib/Plugins.Runtime/src/RuntimePluginLoader.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/Plugins.Runtime/src/RuntimePluginLoader.cs b/lib/Plugins.Runtime/src/RuntimePluginLoader.cs
index 2a03a3d..83aad21 100644
--- a/lib/Plugins.Runtime/src/RuntimePluginLoader.cs
+++ b/lib/Plugins.Runtime/src/RuntimePluginLoader.cs
@@ -26,7 +26,6 @@ using System;
using System.IO;
using System.Text.Json;
using System.Reflection;
-using System.Runtime.Loader;
using System.Threading.Tasks;
using McMaster.NETCore.Plugins;
@@ -59,33 +58,6 @@ namespace VNLib.Plugins.Runtime
public string PluginConfigPath { get; }
/// <summary>
- /// Creates a new <see cref="RuntimePluginLoader"/> with the specified
- /// assembly location and host config.
- /// </summary>
- /// <param name="pluginPath"></param>
- /// <param name="log">A nullable log provider</param>
- /// <param name="hostConfig">The configuration DOM to merge with plugin config DOM and pass to enabled plugins</param>
- /// <param name="unloadable">A value that specifies if the assembly can be unloaded</param>
- /// <param name="hotReload">A value that spcifies if the loader will listen for changes to the assembly file and reload the plugins</param>
- /// <remarks>
- /// The <paramref name="log"/> argument may be null if <paramref name="unloadable"/> is false
- /// </remarks>
- /// <exception cref="ArgumentNullException"></exception>
- public RuntimePluginLoader(string pluginPath, JsonElement? hostConfig = null, ILogProvider? log = null, bool unloadable = false, bool hotReload = false)
- :this(
- new PluginConfig(pluginPath)
- {
- IsUnloadable = unloadable || hotReload,
- EnableHotReload = hotReload,
- ReloadDelay = TimeSpan.FromSeconds(1),
- PreferSharedTypes = true,
- DefaultContext = AssemblyLoadContext.Default
- },
- hostConfig, log)
- {
- }
-
- /// <summary>
/// Creates a new <see cref="RuntimePluginLoader"/> with the specified config and host config dom.
/// </summary>
/// <param name="config">The plugin's loader configuration </param>
@@ -94,9 +66,6 @@ namespace VNLib.Plugins.Runtime
/// <exception cref="ArgumentNullException"></exception>
public RuntimePluginLoader(PluginConfig config, JsonElement? hostConfig, ILogProvider? log)
{
- //Shared types is required so the default load context shares types
- config.PreferSharedTypes = true;
-
//Default to empty config if null, otherwise clone a copy of the host config element
HostConfig = hostConfig.HasValue ? Clone(hostConfig.Value) : JsonDocument.Parse("{}");