Méthode | Description | |
---|---|---|
FileExists ( string virtualPath ) : bool |
Gets a value that indicates whether a file exists in the virtual file system. This override checks to see if the embedded resource file exists in memory. If so, this method will return |
|
GetCacheDependency ( string virtualPath, IEnumerable virtualPathDependencies, System.DateTime utcStart ) : System.Web.Caching.CacheDependency |
Creates a cache dependency based on the specified virtual paths.
|
|
GetFile ( string virtualPath ) : System.Web.Hosting.VirtualFile |
Gets a virtual file from the virtual file system.
|
Méthode | Description | |
---|---|---|
GetConfiguredAssemblyNames ( ) : string[] |
Gets the names of the configured assemblies from configuration.
|
|
Initialize ( ) : void |
Initializes the System.Web.Hosting.VirtualPathProvider instance. The set of assemblies configured to provide embedded resource files are queried for GSF.Web.Hosting.EmbeddedResourceFileAttribute attributes. For each one present, the associated embedded resource is added to the virtual file system served by this provider. |
|
MapResourceToWebApplication ( string baseNamespace, string resourcePath ) : string |
Maps an embedded resource ID into a web application relative path (~/path). The baseNamespace is stripped from the front of the resourcePath and all but the last period in the remaining resourcePath is replaced with the directory separator character ('/'). Finally, that path is mapped into a web application relative path. The filename being mapped must have an extension associated with it, and that extension may not have a period in it. Only one period will be kept in the mapped filename - others will be assumed to be directory separators. If a filename has multiple extensions (i.e., If baseNamespace does not occur at the start of the resourcePath, an System.InvalidOperationException is thrown. |
|
ProcessEmbeddedFiles ( string assemblyName ) : void |
Reads in the embedded files from an assembly an processes them into the virtual file system. The assemblyName will be passed to System.Reflection.Assembly.Load(string) so the associated assembly can be processed. If the assembly is not found, a System.IO.FileNotFoundException is thrown. Once the assembly is retrieved, it is queried for GSF.Web.Hosting.EmbeddedResourceFileAttribute instances. For each one found, the associated resources are processed into virtual files that will be stored in GSF.Web.Hosting.EmbeddedResourcePathProvider.Files for later use. |
Méthode | Description | |
---|---|---|
FileHandledByBaseProvider ( string absolutePath ) : bool |
Determines if a file should be handled by the base provider or if it should be handled by this provider.
|
|
ValidateResourcePath ( string paramName, string path ) : void |
Validates an embedded resource path or namespace.
|
public FileExists ( string virtualPath ) : bool | ||
virtualPath | string | The path to the virtual file. |
Résultat | bool |
public GetCacheDependency ( string virtualPath, IEnumerable virtualPathDependencies, System.DateTime utcStart ) : System.Web.Caching.CacheDependency | ||
virtualPath | string | The path to the primary virtual resource. |
virtualPathDependencies | IEnumerable | An array of paths to other resources required by the primary virtual resource. |
utcStart | System.DateTime | The UTC time at which the virtual resources were read. |
Résultat | System.Web.Caching.CacheDependency |
protected static GetConfiguredAssemblyNames ( ) : string[] | ||
Résultat | string[] |
public GetFile ( string virtualPath ) : System.Web.Hosting.VirtualFile | ||
virtualPath | string | The path to the virtual file. |
Résultat | System.Web.Hosting.VirtualFile |
protected static MapResourceToWebApplication ( string baseNamespace, string resourcePath ) : string | ||
baseNamespace | string | /// The base namespace of the resource to map. /// |
resourcePath | string | /// The fully qualified embedded resource path to map. /// |
Résultat | string |
protected ProcessEmbeddedFiles ( string assemblyName ) : void | ||
assemblyName | string | The name of the |
Résultat | void |