C# Класс FakeHttpContext.FakeWorkerRequest

Наследование: System.Web.HttpWorkerRequest
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
EndOfRequest ( ) : void

Used by the runtime to notify the T:System.Web.HttpWorkerRequest that request processing for the current request is complete.

FlushResponse ( bool finalFlush ) : void

Sends all pending response data to the client.

GetHttpVerbName ( ) : string

Returns the specified member of the request header.

GetHttpVersion ( ) : string

Provides access to the HTTP version of the request (for example, "HTTP/1.1").

GetKnownRequestHeader ( int index ) : string

Returns the standard HTTP request header that corresponds to the specified index.

GetLocalAddress ( ) : string

Provides access to the specified member of the request header.

GetLocalPort ( ) : int

Provides access to the specified member of the request header.

GetProtocol ( ) : string

When overridden in a derived class, returns the HTTP protocol (HTTP or HTTPS).

GetQueryString ( ) : string

Returns the query string specified in the request URL.

GetRawUrl ( ) : string

Returns the URL path contained in the request header with the query string appended.

GetRemoteAddress ( ) : string

Provides access to the specified member of the request header.

GetRemotePort ( ) : int

Provides access to the specified member of the request header.

GetUnknownRequestHeaders ( ) : string[][]
GetUriPath ( ) : string

Returns the virtual path to the requested URI.

SendKnownResponseHeader ( int index, string value ) : void

Adds a standard HTTP header to the response.

SendResponseFromFile ( IntPtr handle, long offset, long length ) : void

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.

SendResponseFromFile ( string filename, long offset, long length ) : void

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.

SendResponseFromMemory ( byte data, int length ) : void

Adds the specified number of bytes from a byte array to the response.

SendStatus ( int statusCode, string statusDescription ) : void

Specifies the HTTP status code and status description of the response, such as SendStatus(200, "Ok").

SendUnknownResponseHeader ( string name, string value ) : void

Adds a nonstandard HTTP header to the response.

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

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

Used by the runtime to notify the T:System.Web.HttpWorkerRequest that request processing for the current request is complete.
public EndOfRequest ( ) : void
Результат void

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

Sends all pending response data to the client.
public FlushResponse ( bool finalFlush ) : void
finalFlush bool true if this is the last time response data will be flushed; otherwise, false.
Результат void

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

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

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

Provides access to the HTTP version of the request (for example, "HTTP/1.1").
public GetHttpVersion ( ) : string
Результат string

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

Returns the standard HTTP request header that corresponds to the specified index.
public GetKnownRequestHeader ( int index ) : string
index int The index of the header. For example, the field.
Результат string

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

Provides access to the specified member of the request header.
public GetLocalAddress ( ) : string
Результат string

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

Provides access to the specified member of the request header.
public GetLocalPort ( ) : int
Результат int

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

When overridden in a derived class, returns the HTTP protocol (HTTP or HTTPS).
public GetProtocol ( ) : string
Результат string

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

Returns the query string specified in the request URL.
public GetQueryString ( ) : string
Результат string

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

Returns the URL path contained in the request header with the query string appended.
public GetRawUrl ( ) : string
Результат string

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

Provides access to the specified member of the request header.
public GetRemoteAddress ( ) : string
Результат string

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

Provides access to the specified member of the request header.
public GetRemotePort ( ) : int
Результат int

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

public GetUnknownRequestHeaders ( ) : string[][]
Результат string[][]

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

Returns the virtual path to the requested URI.
public GetUriPath ( ) : string
Результат string

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

Adds a standard HTTP header to the response.
public SendKnownResponseHeader ( int index, string value ) : void
index int The header index. For example, .
value string The value of the header.
Результат void

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

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.
public SendResponseFromFile ( IntPtr handle, long offset, long length ) : void
handle System.IntPtr The handle of the file to send.
offset long The starting position in the file.
length long The number of bytes to send.
Результат void

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

Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.
public SendResponseFromFile ( string filename, long offset, long length ) : void
filename string The name of the file to send.
offset long The starting position in the file.
length long The number of bytes to send.
Результат void

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

Adds the specified number of bytes from a byte array to the response.
public SendResponseFromMemory ( byte data, int length ) : void
data byte The byte array to send.
length int The number of bytes to send, starting at the first byte.
Результат void

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

Specifies the HTTP status code and status description of the response, such as SendStatus(200, "Ok").
public SendStatus ( int statusCode, string statusDescription ) : void
statusCode int The status code to send
statusDescription string The status description to send.
Результат void

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

Adds a nonstandard HTTP header to the response.
public SendUnknownResponseHeader ( string name, string value ) : void
name string The name of the header to send.
value string The value of the header.
Результат void