|
|
Embedded
|
The EmbeddedResourceProvider type exposes the following members.
| Name | Description | |
|---|---|---|
| EmbeddedResourceProvider | Initializes a new instance of the EmbeddedResourceProvider class |
| Name | Description | |
|---|---|---|
| Previous | Gets a reference to a previously registered VirtualPathProvider object in the compilation system. (Inherited from VirtualPathProvider) |
| Name | Description | |
|---|---|---|
| CombineVirtualPaths | Combines a base path with a relative path to return a complete path to a virtual resource. (Inherited from VirtualPathProvider) | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject) | |
| DirectoryExists |
Gets a value that indicates whether a directory exists in the virtual file system.
(Overrides VirtualPathProviderDirectoryExists(String)) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| FileExists |
Gets a value that indicates whether a file exists in the virtual file system.
(Overrides VirtualPathProviderFileExists(String)) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetCacheDependency |
Creates a cache dependency based on the specified virtual paths.
(Overrides VirtualPathProviderGetCacheDependency(String, IEnumerable, DateTime)) | |
| GetCacheKey | Returns a cache key to use for the specified virtual path. (Inherited from VirtualPathProvider) | |
| GetDirectory |
Gets a virtual directory from the virtual file system.
(Overrides VirtualPathProviderGetDirectory(String)) | |
| GetFile |
Gets a file from the virtual file system.
(Overrides VirtualPathProviderGetFile(String)) | |
| GetFileHash | Returns a hash of the specified virtual paths. (Inherited from VirtualPathProvider) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| Initialize | Initializes the VirtualPathProvider instance. (Inherited from VirtualPathProvider) | |
| InitializeLifetimeService | Gives the VirtualPathProvider object an infinite lifetime by preventing a lease from being created. (Inherited from VirtualPathProvider) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject) | |
| Register | Registers the EmbeddedResourceProvider within a HostingEnvironment. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
| GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
This provider responds to requests for embedded resources when the virtual path begins with an "@", e.g., http://localhost/@GSF.Web.Model.Scripts.gsf.web.client.js
To use, add the following to the Global.asax.cs Application_Start function:
// Add additional virtual path provider to allow access to embedded resources
EmbeddedResourceProvider.Register();<system.webServer>
<handlers>
<!-- Add embedded resource handler for GSF script resources using slash delimiters -->
<add name="EmbeddedResourceHandler-GSFScripts" path="@GSF/Web/Model/Scripts/*" verb="*" type="System.Web.StaticFileHandler" allowPathInfo="true" />
<!-- Add embedded resource handler for GSF view resources using slash delimiters -->
<add name="EmbeddedResourceHandler-GSFViews" path="@GSF/Web/Model/Views/*" verb="*" type="System.Web.StaticFileHandler" allowPathInfo="true" />
<!-- Add embedded resource handler for GSF handler resources using slash delimiters -->
<add name="EmbeddedResourceHandler-GSFHandlers" path="@GSF/Web/Model/Handlers/*" verb="*" type="System.Web.UI.SimpleHandlerFactory" allowPathInfo="true" />
<!-- Add embedded resource handler for fully qualified type names using dot delimiters (this should be defined last) -->
<add name="EmbeddedResourceHandler-FQName" path="@*" verb="*" type="System.Web.StaticFileHandler" allowPathInfo="true" />
</handlers>
</system.webServer>