C# Class Headless.Page

The Page class provides the base page logic for interacting with a browser response.
Inheritance: IPage
显示文件 Open project: roryprimrose/Headless

Public Methods

Method Description
Initialize ( IBrowser browser, HttpResponseMessage response, HttpResult result ) : void
IsOn ( Uri location ) : bool

Determines whether the the page is on the specified location.

ToString ( ) : string

Protected Methods

Method Description
Initialize ( IBrowser browser, HttpStatusCode statusCode, string statusDescription, HttpResult result ) : void

Initializes the page with the specified values.

SetContent ( HttpContent content ) : void

Sets the content of the page from the specified content.

Method Details

Initialize() public method

/// The parameter is null. /// /// The parameter is null. /// /// The parameter is null. ///
public Initialize ( IBrowser browser, HttpResponseMessage response, HttpResult result ) : void
browser IBrowser
response System.Net.Http.HttpResponseMessage
result HttpResult
return void

Initialize() protected method

Initializes the page with the specified values.
protected Initialize ( IBrowser browser, HttpStatusCode statusCode, string statusDescription, HttpResult result ) : void
browser IBrowser /// The browser. ///
statusCode HttpStatusCode /// The status code. ///
statusDescription string /// The status description. ///
result HttpResult /// The result. ///
return void

IsOn() public method

Determines whether the the page is on the specified location.
/// The parameter is null. /// /// The parameter is a relative location. ///
public IsOn ( Uri location ) : bool
location System.Uri /// The current location. ///
return bool

SetContent() protected abstract method

Sets the content of the page from the specified content.
protected abstract SetContent ( HttpContent content ) : void
content System.Net.Http.HttpContent /// The HTTP response content. ///
return void

ToString() public method

public ToString ( ) : string
return string