C# Class GSF.Web.Hosting.EmbeddedResourceVirtualFile

Represents a file object in embedded resource space.

This type is used by the GSF.Web.Hosting.EmbeddedResourcePathProvider to serve embedded resources as virtual files. The properties on the file can be used to retrieve an embedded resource stream from the GSF.Web.Hosting.EmbeddedResourceVirtualFile.ContainingAssembly at the appropriate GSF.Web.Hosting.EmbeddedResourceVirtualFile.ResourcePath using reflection. As part of the System.Web.Hosting.VirtualFile interface, you can do this easily via GSF.Web.Hosting.EmbeddedResourceVirtualFile.Open.

For more information on embedded resource virtual filesystem usage, see GSF.Web.Hosting.EmbeddedResourcePathProvider

Inheritance: System.Web.Hosting.VirtualFile
Mostrar archivo Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
EmbeddedResourceVirtualFile ( string virtualPath, Assembly containingAssembly, string resourcePath ) : System

Initializes a new instance of the GSF.Web.Hosting.EmbeddedResourceVirtualFile class.

Open ( ) : Stream

Returns a read-only stream to the virtual resource.

Method Details

EmbeddedResourceVirtualFile() public method

Initializes a new instance of the GSF.Web.Hosting.EmbeddedResourceVirtualFile class.
/// Thrown if or is . /// /// Thrown if is . ///
public EmbeddedResourceVirtualFile ( string virtualPath, Assembly containingAssembly, string resourcePath ) : System
virtualPath string The virtual path to the resource represented by this instance.
containingAssembly System.Reflection.Assembly The containing the resource represented by this instance.
resourcePath string The path to the embedded resource in the .
return System

Open() public method

Returns a read-only stream to the virtual resource.
public Open ( ) : Stream
return Stream