C# Class UnitTests.Subtext.SimulatedHttpRequest

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

Méthodes publiques

Méthode 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

Méthode Description
SetReferer ( Uri referer ) : void

Method Details

GetAppPath() public méthode

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

GetAppPathTranslated() public méthode

public GetAppPathTranslated ( ) : string
Résultat string

GetFilePathTranslated() public méthode

public GetFilePathTranslated ( ) : string
Résultat string

GetHttpVerbName() public méthode

Returns the specified member of the request header.
public GetHttpVerbName ( ) : string
Résultat string

GetKnownRequestHeader() public méthode

public GetKnownRequestHeader ( int index ) : string
index int
Résultat string

GetLocalPort() public méthode

public GetLocalPort ( ) : int
Résultat int

GetPreloadedEntityBody() public méthode

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

GetServerName() public méthode

Gets the name of the server.
public GetServerName ( ) : string
Résultat string

GetUnknownRequestHeaders() public méthode

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

GetUriPath() public méthode

public GetUriPath ( ) : string
Résultat string

IsEntireEntityBodyIsPreloaded() public méthode

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

SimulatedHttpRequest() public méthode

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.
Résultat System