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);
        }
        internal static MetadataArtifactLoader CreateResourceLoader(
            string path,
            MetadataArtifactLoader.ExtensionCheck extensionCheck,
            string validExtension,
            ICollection <string> uriRegistry,
            MetadataArtifactAssemblyResolver resolver)
        {
            string assemblyName = (string)null;
            string resourceName = (string)null;

            MetadataArtifactLoaderCompositeResource.ParseResourcePath(path, out assemblyName, out resourceName);
            bool flag = assemblyName != null && (resourceName == null || assemblyName.Trim() == MetadataArtifactLoader.wildcard);

            MetadataArtifactLoaderCompositeResource.ValidateExtension(extensionCheck, validExtension, resourceName);
            if (flag)
            {
                return((MetadataArtifactLoader) new MetadataArtifactLoaderCompositeResource(path, assemblyName, resourceName, uriRegistry, resolver));
            }
            return((MetadataArtifactLoader) new MetadataArtifactLoaderResource(MetadataArtifactLoaderCompositeResource.ResolveAssemblyName(assemblyName, resolver), resourceName, uriRegistry));
        }