예제 #1
0
        protected PluginLoadContext ToPluginLoadContext <T>(AssemblyScanResult plugin)
        {
            var hostFramework  = HostFrameworkUtils.GetHostframeworkFromHost();
            var pathToAssembly = Path.Combine(plugin.AssemblyPath, plugin.AssemblyName);

            return(PluginLoadContext.DefaultPluginLoadContext(pathToAssembly, typeof(T), hostFramework));
        }