C# Класс UnitTests.Subtext.SimulatedHttpRequest

Used to simulate an HttpRequest.
Наследование: System.Web.Hosting.SimpleWorkerRequest
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
SetReferer ( Uri referer ) : void

Описание методов

GetAppPath() публичный Метод

Returns the virtual path to the currently executing server application.
public GetAppPath ( ) : string
Результат string

GetAppPathTranslated() публичный Метод

public GetAppPathTranslated ( ) : string
Результат string

GetFilePathTranslated() публичный Метод

public GetFilePathTranslated ( ) : string
Результат string

GetHttpVerbName() публичный Метод

Returns the specified member of the request header.
public GetHttpVerbName ( ) : string
Результат string

GetKnownRequestHeader() публичный Метод

public GetKnownRequestHeader ( int index ) : string
index int
Результат string

GetLocalPort() публичный Метод

public GetLocalPort ( ) : int
Результат int

GetPreloadedEntityBody() публичный Метод

Reads request data from the client (when not preloaded).
public GetPreloadedEntityBody ( ) : byte[]
Результат byte[]

GetServerName() публичный Метод

Gets the name of the server.
public GetServerName ( ) : string
Результат string

GetUnknownRequestHeaders() публичный Метод

Get all nonstandard HTTP header name-value pairs.
public GetUnknownRequestHeaders ( ) : string[][]
Результат string[][]

GetUriPath() публичный Метод

public GetUriPath ( ) : string
Результат string

IsEntireEntityBodyIsPreloaded() публичный Метод

Returns a value indicating whether all request data is available and no further reads from the client are required.
public IsEntireEntityBodyIsPreloaded ( ) : bool
Результат bool

SimulatedHttpRequest() публичный Метод

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.
Результат System