public void AddAssembly(Assembly assembly, string folder, string prefix)
        {
            prefix = prefix.Trim('/');
            string assemblyName = assembly.GetName().Name;
            string filteredAssemblyName = (string.IsNullOrEmpty(folder)) ? assemblyName : assemblyName + "." + folder;
            string prefixAsKey = GetResourceKey(prefix);
            foreach (var resourceName in assembly.GetManifestResourceNames().Where(n => n.StartsWith(filteredAssemblyName)))
            {
                var key = prefixAsKey + "." + resourceName.ToLower().Substring(filteredAssemblyName.Length + 1);
                var resource = _resources[key] = new EmbeddedResource(assembly, resourceName);

                var tempUrl = key.Replace('.', '/');
                var fileExtensionDot = tempUrl.LastIndexOf('/');
                var url = "/" + tempUrl.Substring(0, fileExtensionDot) + "." + tempUrl.Substring(fileExtensionDot + 1);
                _urls[resource] = url;

                var directory = VirtualPathUtility.GetDirectory(url).Trim('/');
                if (!_directories.Contains(directory))
                    _directories.Add(directory);
            }
        }
 public EmbeddedResourceVirtualFile(string virtualPath, EmbeddedResource resource)
     : base(virtualPath)
 {
     _resource = resource;
 }