C# Class afung.MangaWeb3.Server.AjaxBase

The base class for Http request server entry point
Inheritance: System.Web.UI.Page
显示文件 Open project: a-fung/MangaWeb3 Class Usage Examples

Public Methods

Method Description
BadRequest ( ) : void

Return "bad request" to the client app

ReturnJson ( JsonResponse response ) : void

Return a Json response to the client app

Unauthorized ( ) : void

Return "unauthorized" to the client app

Protected Methods

Method Description
HandleRequest ( HandlerBase handlers ) : void

Handle the json request using a list of handlers

PageLoad ( ) : void

The PageLoad function is to be overriden by child class In this function it should create a list of handlers and call the HandleRequest function

Page_Load ( object sender, EventArgs e ) : void

Called when the page loads

Private Methods

Method Description
RequestParams ( string name ) : string

Get the value of a request parameter

Method Details

BadRequest() public method

Return "bad request" to the client app
public BadRequest ( ) : void
return void

HandleRequest() protected method

Handle the json request using a list of handlers
protected HandleRequest ( HandlerBase handlers ) : void
handlers afung.MangaWeb3.Server.Handler.HandlerBase The array of handlers
return void

PageLoad() protected abstract method

The PageLoad function is to be overriden by child class In this function it should create a list of handlers and call the HandleRequest function
protected abstract PageLoad ( ) : void
return void

Page_Load() protected method

Called when the page loads
protected Page_Load ( object sender, EventArgs e ) : void
sender object The sender
e System.EventArgs The event argument
return void

ReturnJson() public method

Return a Json response to the client app
public ReturnJson ( JsonResponse response ) : void
response JsonResponse The response object to be stringify and return to client app
return void

Unauthorized() public method

Return "unauthorized" to the client app
public Unauthorized ( ) : void
return void