C# Class Spring.Util.HttpContextSwitch

Performs a HttpContext.RewritePath(string). Original path will be restored on Dispose
Rewrites the current HttpContext's filepath to <directory>/currentcontext.dummy.
This affects resolving resources by calls to Spring.Util.ConfigurationUtils.GetSection and HttpRequest.MapPath(string)
Original path is restored during HttpContextSwitch.Dispose.
Inheritance: IDisposable
Show file Open project: spring-projects/spring-net

Public Methods

Method Description
Dispose ( ) : void

Restores original path if necessary

HttpContextSwitch ( string virtualDirectory ) : System

Performs an immediate call to HttpContext.RewritePath(string)

Method Details

Dispose() public method

Restores original path if necessary
public Dispose ( ) : void
return void

HttpContextSwitch() public method

Performs an immediate call to HttpContext.RewritePath(string)
public HttpContextSwitch ( string virtualDirectory ) : System
virtualDirectory string a directory path (without trailing filename!)
return System