Пример #1
0
        protected virtual async Task <bool> LoadPluginFromNugetPackageAsync(string packagePath)
        {
            var assemblies = await nugetPackageManager.LoadAssembliesFromNugetPackageAsync(packagePath);

            bool success = false;

            foreach (var asm in assemblies)
            {
                if (LoadPluginFromAssembly(asm, out var pluginChildContainer) != null)
                {
                    success = await RegisterAndLoadPluginFromContainer(pluginChildContainer);
                }
            }

            return(success);
        }
Пример #2
0
 private async Task LoadPackageAsync(NuGetPackageManager packageManager, PackageIdentity identity)
 {
     var pkg = packageManager.GetNugetPackageFile(identity);
     await packageManager.LoadAssembliesFromNugetPackageAsync(pkg);
 }