C# Class Spring.Core.IO.WebResource

Spring.Core.IO.IResource implementation specifically for resources served up from a web server.

Uses the System.Web.HttpContext.Current.Server.MapPath method to resolve the file name for a given resource.

Inheritance: Spring.Core.IO.FileSystemResource
Exibir arquivo Open project: spring-projects/spring-net

Public Methods

Method Description
WebResource ( string resourceName ) : System.IO

Creates a new instance of the Spring.Core.IO.WebResource class.

Protected Methods

Method Description
CreateResourceInstance ( string resourceName ) : IResource

Factory Method. Create a new instance of the current resource type using the given resourceName

GetResourceLoader ( ) : IResourceLoader

The ResourceLoader to be used for resolving relative resources

IsRelativeResource ( string resourceName ) : bool

Does the supplied resourceName relative ?

ResolveBasePathPlaceHolder ( string resourceName, string basePathPlaceHolder ) : string

Resolves the presence of the basePathPlaceHolder value in the supplied resourceName into a path.

ResolveFileHandle ( string resourceName ) : FileInfo

Resolves the System.IO.FileInfo handle for the supplied resourceName.

ResolveResourcePath ( string resourceName ) : string

Resolves the path for the supplied resourceName.

ResolveRootLocation ( string resourceName ) : string

Resolves the root location for the supplied resourceName.

Method Details

CreateResourceInstance() protected method

Factory Method. Create a new instance of the current resource type using the given resourceName
protected CreateResourceInstance ( string resourceName ) : IResource
resourceName string
return IResource

GetResourceLoader() protected method

The ResourceLoader to be used for resolving relative resources
protected GetResourceLoader ( ) : IResourceLoader
return IResourceLoader

IsRelativeResource() protected method

Does the supplied resourceName relative ?
protected IsRelativeResource ( string resourceName ) : bool
resourceName string /// The name of the resource to test. ///
return bool

ResolveBasePathPlaceHolder() protected method

Resolves the presence of the basePathPlaceHolder value in the supplied resourceName into a path.
protected ResolveBasePathPlaceHolder ( string resourceName, string basePathPlaceHolder ) : string
resourceName string /// The name of the resource. ///
basePathPlaceHolder string /// The string that is a placeholder for a base path. ///
return string

ResolveFileHandle() protected method

Resolves the System.IO.FileInfo handle for the supplied resourceName.
protected ResolveFileHandle ( string resourceName ) : FileInfo
resourceName string /// The name of the file system resource. ///
return System.IO.FileInfo

ResolveResourcePath() protected method

Resolves the path for the supplied resourceName.
protected ResolveResourcePath ( string resourceName ) : string
resourceName string /// The name of the file system resource. ///
return string

ResolveRootLocation() protected method

Resolves the root location for the supplied resourceName.
protected ResolveRootLocation ( string resourceName ) : string
resourceName string /// The name of the file system resource. ///
return string

WebResource() public method

Creates a new instance of the Spring.Core.IO.WebResource class.
public WebResource ( string resourceName ) : System.IO
resourceName string /// The name of the file system resource (on the server). ///
return System.IO