WebResource Class |
Namespace: Tangosol.IO.Resources
public class WebResource : FileResource
The WebResource type exposes the following members.
Name | Description | |
---|---|---|
![]() | WebResource |
Creates a new instance of the WebResource class.
|
Name | Description | |
---|---|---|
![]() | AbsolutePath |
Gets an absolute path of this resource.
(Inherited from AbstractResource.) |
![]() | Uri |
Gets the fully qualified URI for this IResource.
(Inherited from AbstractResource.) |
Name | Description | |
---|---|---|
![]() | Equals |
Compares specified with the current object.
(Inherited from AbstractResource.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetFileHandle |
Resolves the System.IO.FileInfo handle for the supplied
resourceName.
(Overrides FileResourceGetFileHandle(String).) |
![]() | GetHashCode |
A hash function that returns the hashcode for this type, that is
suitable for use in hashing algorithms and data structures like a
hash table.
(Inherited from AbstractResource.) |
![]() | GetStream |
Gets a stream for this IResource.
(Inherited from FileResource.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString |
Returns the textual information about this resource.
(Inherited from AbstractResource.) |
Uses the System.Web.HttpContext.Current.Server.MapPath method to resolve the file name for a given resource.
Note that the WebResource is resolved in the context of the HTTP request it is constructed in, which means that the relative paths will be resolved relative to the requested web page.
If you want the resource to be resolved relative to the web application root, make sure that you prefix resource name with a tilde (~) character:
web://~/my-resource.txt