コード例 #1
0
        static IEnumerable <ManagedLibrary> ResolveRuntimeAssemblies(this DependencyContext depContext, RuntimeFallbacks runtimeGraph)
        {
            var rids = GetRids(runtimeGraph);

            return(from library in depContext.RuntimeLibraries
                   from assetPath in SelectAssets(rids, library.RuntimeAssemblyGroups)
                   select ManagedLibrary.CreateFromPackage(assetPath));
        }
コード例 #2
0
        bool SearchForLibrary(ManagedLibrary library, out string path)
        {
            // 1. Search in base path
            foreach (var ext in ManagedAssemblyExtensions)
            {
                var local = Path.Combine(basePath, library.Name.Name + ext);
                if (File.Exists(local))
                {
                    path = local;
                    return(true);
                }
            }

            path = null;
            return(false);
        }
コード例 #3
0
 public AssemblyLoadContextBuilder AddManagedLibrary(ManagedLibrary library)
 {
     managedLibraries.Add(library.Name.Name, library);
     return(this);
 }