From 189c6714057bf45553847eaeb9ce97eb7272eb8c Mon Sep 17 00:00:00 2001 From: vman Date: Wed, 28 Dec 2022 23:48:48 -0500 Subject: Share only vnlib types for now --- VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs') diff --git a/VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs b/VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs index a53bb0a..5baf123 100644 --- a/VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs +++ b/VNLib.Plugins.Extensions.Loading/AssemblyLoader.cs @@ -134,11 +134,11 @@ namespace VNLib.Plugins.Extensions.Loading typeof(PluginBase), }; - //Add all types that have already been loaded - shared.AddRange(currentCtx.Assemblies.SelectMany(s => s.GetExportedTypes())); + //Share all VNLib internal libraries + shared.AddRange(currentCtx.Assemblies.Where(static s => s.FullName.Contains("VNLib", StringComparison.OrdinalIgnoreCase)).SelectMany(static s => s.GetExportedTypes())); PluginLoader loader = PluginLoader.CreateFromAssemblyFile(assemblyName, - currentCtx.IsCollectible, + currentCtx.IsCollectible, shared.ToArray(), conf => { @@ -149,7 +149,7 @@ namespace VNLib.Plugins.Extensions.Loading * a "child" collection of assemblies */ conf.DefaultContext = currentCtx; - + conf.PreferSharedTypes = true; //Share utils asm -- cgit