C# Class UnitTests.Subtext.SimulatedHttpRequest

Used to simulate an HttpRequest.
Inheritance: System.Web.Hosting.SimpleWorkerRequest
Exibir arquivo Open project: ayende/Subtext Class Usage Examples

Public Methods

Method Description
GetAppPath ( ) : string

Returns the virtual path to the currently executing server application.

GetAppPathTranslated ( ) : string
GetFilePathTranslated ( ) : string
GetHttpVerbName ( ) : string

Returns the specified member of the request header.

GetKnownRequestHeader ( int index ) : string
GetLocalPort ( ) : int
GetPreloadedEntityBody ( ) : byte[]

Reads request data from the client (when not preloaded).

GetServerName ( ) : string

Gets the name of the server.

GetUnknownRequestHeaders ( ) : string[][]

Get all nonstandard HTTP header name-value pairs.

GetUriPath ( ) : string
IsEntireEntityBodyIsPreloaded ( ) : bool

Returns a value indicating whether all request data is available and no further reads from the client are required.

SimulatedHttpRequest ( string applicationPath, string physicalAppPath, string physicalFilePath, string page, string query, TextWriter output, string host, int port, string verb ) : System

Creates a new SimulatedHttpRequest instance.

Private Methods

Method Description
SetReferer ( Uri referer ) : void

Method Details

GetAppPath() public method

Returns the virtual path to the currently executing server application.
public GetAppPath ( ) : string
return string

GetAppPathTranslated() public method

public GetAppPathTranslated ( ) : string
return string

GetFilePathTranslated() public method

public GetFilePathTranslated ( ) : string
return string

GetHttpVerbName() public method

Returns the specified member of the request header.
public GetHttpVerbName ( ) : string
return string

GetKnownRequestHeader() public method

public GetKnownRequestHeader ( int index ) : string
index int
return string

GetLocalPort() public method

public GetLocalPort ( ) : int
return int

GetPreloadedEntityBody() public method

Reads request data from the client (when not preloaded).
public GetPreloadedEntityBody ( ) : byte[]
return byte[]

GetServerName() public method

Gets the name of the server.
public GetServerName ( ) : string
return string

GetUnknownRequestHeaders() public method

Get all nonstandard HTTP header name-value pairs.
public GetUnknownRequestHeaders ( ) : string[][]
return string[][]

GetUriPath() public method

public GetUriPath ( ) : string
return string

IsEntireEntityBodyIsPreloaded() public method

Returns a value indicating whether all request data is available and no further reads from the client are required.
public IsEntireEntityBodyIsPreloaded ( ) : bool
return bool

SimulatedHttpRequest() public method

Creates a new SimulatedHttpRequest instance.
public SimulatedHttpRequest ( string applicationPath, string physicalAppPath, string physicalFilePath, string page, string query, TextWriter output, string host, int port, string verb ) : System
applicationPath string App virtual dir.
physicalAppPath string Physical Path to the app.
physicalFilePath string Physical Path to the file.
page string The Part of the URL after the application.
query string Query.
output System.IO.TextWriter Output.
host string Host.
port int Port to request.
verb string The HTTP Verb to use.
return System