C# Class Rests.Rest

Inheritance: IDisposable
显示文件 Open project: NyxStudios/TShock

Public Properties

Property Type Description
RestRequestEvent HandlerList
tokenBucket int>.Dictionary

Public Methods

Method Description
Dispose ( ) : void
Register ( RestCommand com ) : void
Register ( string path, RestCommandD callback ) : void
Rest ( IPAddress ip, int port ) : System
Start ( ) : void
Start ( IPAddress ip, int port ) : void
Stop ( ) : void

Protected Methods

Method Description
AddCommand ( RestCommand com ) : void
BuildRequestUri ( RestCommand cmd, RestVerbs verbs, IParameterCollection parms, bool includeToken = true ) : string
Dispose ( bool disposing ) : void
ExecuteCommand ( RestCommand cmd, RestVerbs verbs, IParameterCollection parms, IRequest request, IHttpContext context ) : object
OnRequest ( object sender, HttpServer.RequestEventArgs e ) : void
ProcessRequest ( object sender, HttpServer.RequestEventArgs e ) : object

Private Methods

Method Description
DegradeBucket ( ) : void
OnRestRequestCall ( HttpServer.RequestEventArgs request ) : bool

Method Details

AddCommand() protected method

protected AddCommand ( RestCommand com ) : void
com RestCommand
return void

BuildRequestUri() protected method

protected BuildRequestUri ( RestCommand cmd, RestVerbs verbs, IParameterCollection parms, bool includeToken = true ) : string
cmd RestCommand
verbs RestVerbs
parms IParameterCollection
includeToken bool
return string

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ExecuteCommand() protected method

protected ExecuteCommand ( RestCommand cmd, RestVerbs verbs, IParameterCollection parms, IRequest request, IHttpContext context ) : object
cmd RestCommand
verbs RestVerbs
parms IParameterCollection
request IRequest
context IHttpContext
return object

OnRequest() protected method

protected OnRequest ( object sender, HttpServer.RequestEventArgs e ) : void
sender object
e HttpServer.RequestEventArgs
return void

ProcessRequest() protected method

protected ProcessRequest ( object sender, HttpServer.RequestEventArgs e ) : object
sender object
e HttpServer.RequestEventArgs
return object

Register() public method

public Register ( RestCommand com ) : void
com RestCommand
return void

Register() public method

public Register ( string path, RestCommandD callback ) : void
path string
callback RestCommandD
return void

Rest() public method

public Rest ( IPAddress ip, int port ) : System
ip System.Net.IPAddress
port int
return System

Start() public method

public Start ( ) : void
return void

Start() public method

public Start ( IPAddress ip, int port ) : void
ip System.Net.IPAddress
port int
return void

Stop() public method

public Stop ( ) : void
return void

Property Details

RestRequestEvent public_oe static_oe property

public static HandlerList RestRequestEvent
return HandlerList

tokenBucket public_oe property

public Dictionary tokenBucket
return int>.Dictionary