src/Shared/EntityFramework/Core/Metadata/Edm/MetadataArtifactLoaderCompositeResource.cs
// <summary>
// Load all resources from the assembly/assemblies identified in the resource path.
// </summary>
// <param name="uriRegistry"> The global registry of URIs </param>
Load all resources from the assembly/assemblies identified in the resource path.
Load all resources from the assembly / assemblies identified in the resource path .
private static List<MetadataArtifactLoaderResource> LoadResources(
            string assemblyName, string resourceName, ICollection<string> uriRegistry, MetadataArtifactAssemblyResolver resolver)
        {
            DebugCheck.NotNull(resolver);
            var loaders = new List<MetadataArtifactLoaderResource>();
            DebugCheck.NotEmpty(assemblyName);
            if (assemblyName == wildcard)
            {
                foreach (var assembly in resolver.GetWildcardAssemblies())
                {
                    if (AssemblyContainsResource(assembly, ref resourceName))
                    {
                        LoadResourcesFromAssembly(assembly, resourceName, uriRegistry, loaders);
                    }
                }
            }
            else
            {
                var assembly = ResolveAssemblyName(assemblyName, resolver);
                LoadResourcesFromAssembly(assembly, resourceName, uriRegistry, loaders);
            }
            if (resourceName != null
                && loaders.Count == 0)
            {
                throw new MetadataException(Strings.UnableToLoadResource);
            }
            return loaders;
        }
private static List < MetadataArtifactLoaderResource > LoadResources ( string assemblyName , string resourceName , ICollection < string > uriRegistry , MetadataArtifactAssemblyResolver resolver ) { DebugCheck . NotNull ( resolver ) ; var loaders = new List < MetadataArtifactLoaderResource > ( ) ; DebugCheck . NotEmpty ( assemblyName ) ; if ( assemblyName == wildcard ) { foreach ( var assembly in resolver . GetWildcardAssemblies ( ) ) { if ( AssemblyContainsResource ( assembly , ref resourceName ) ) { LoadResourcesFromAssembly ( assembly , resourceName , uriRegistry , loaders ) ; } } } else { var assembly = ResolveAssemblyName ( assemblyName , resolver ) ; LoadResourcesFromAssembly ( assembly , resourceName , uriRegistry , loaders ) ; } if ( resourceName != null && loaders . Count == 0 ) { throw new MetadataException ( Strings . UnableToLoadResource ) ; } return loaders ; }
Load all resources from the assembly/assemblies identified in the resource path.
Load all resources from the assembly / assemblies identified in the resource path .
// they were asking for a specific resource name, and we didn't find it
assemblyName
string
resourceName
string
uriRegistry
ICollection<string>
The global registry of URIs
The global registry of URIs
resolver
MetadataArtifactAssemblyResolver