private static List <MetadataArtifactLoaderResource> LoadResources(
            string assemblyName,
            string resourceName,
            ICollection <string> uriRegistry,
            MetadataArtifactAssemblyResolver resolver)
        {
            List <MetadataArtifactLoaderResource> loaders = new List <MetadataArtifactLoaderResource>();

            if (assemblyName == MetadataArtifactLoader.wildcard)
            {
                foreach (Assembly wildcardAssembly in resolver.GetWildcardAssemblies())
                {
                    if (MetadataArtifactLoaderCompositeResource.AssemblyContainsResource(wildcardAssembly, ref resourceName))
                    {
                        MetadataArtifactLoaderCompositeResource.LoadResourcesFromAssembly(wildcardAssembly, resourceName, uriRegistry, loaders);
                    }
                }
            }
            else
            {
                MetadataArtifactLoaderCompositeResource.LoadResourcesFromAssembly(MetadataArtifactLoaderCompositeResource.ResolveAssemblyName(assemblyName, resolver), resourceName, uriRegistry, loaders);
            }
            if (resourceName != null && loaders.Count == 0)
            {
                throw new System.Data.Entity.Core.MetadataException(Strings.UnableToLoadResource);
            }
            return(loaders);
        }
 private static void LoadResourcesFromAssembly(
     Assembly assembly,
     string resourceName,
     ICollection <string> uriRegistry,
     List <MetadataArtifactLoaderResource> loaders)
 {
     if (resourceName == null)
     {
         MetadataArtifactLoaderCompositeResource.LoadAllResourcesFromAssembly(assembly, uriRegistry, loaders);
     }
     else
     {
         if (!MetadataArtifactLoaderCompositeResource.AssemblyContainsResource(assembly, ref resourceName))
         {
             throw new System.Data.Entity.Core.MetadataException(Strings.UnableToLoadResource);
         }
         MetadataArtifactLoaderCompositeResource.CreateAndAddSingleResourceLoader(assembly, resourceName, uriRegistry, loaders);
     }
 }