Click or drag to resize

WebResource Class

Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
14c (14.1.1.0)
F23534-02
A resource implementation that should be used for accces to resources within ASP.NET application.
Inheritance Hierarchy

Namespace:  Tangosol.IO.Resources
Assembly:  Coherence (in Coherence.dll) Version: 14.1.1.14 (14.1.1.14)
Syntax
C#
public class WebResource : FileResource

The WebResource type exposes the following members.

Constructors
  NameDescription
Public methodWebResource
Creates a new instance of the WebResource class.
Top
Properties
  NameDescription
Public propertyAbsolutePath
Gets an absolute path of this resource.
(Inherited from AbstractResource.)
Public propertyUri
Gets the fully qualified URI for this IResource.
(Inherited from AbstractResource.)
Top
Methods
  NameDescription
Public methodEquals
Compares specified with the current object.
(Inherited from AbstractResource.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetFileHandle
Resolves the System.IO.FileInfo handle for the supplied resourceName.
(Overrides FileResourceGetFileHandle(String).)
Public methodGetHashCode
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.)
Public methodGetStream
Gets a stream for this IResource.
(Inherited from FileResource.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns the textual information about this resource.
(Inherited from AbstractResource.)
Top
Remarks

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
See Also