C# 클래스 GnomeServer.IntegratedWebServer

상속: IWebServer
파일 보기 프로젝트 열기: Rychard/GnomeServer

공개 메소드들

메소드 설명
GetWebRoot ( ) : String

Gets the full path to the directory where static pages are served from.

IntegratedWebServer ( ) : System

Initializes a new instance of the IntegratedWebServer class.

LogMessage ( String message, String label = null ) : void

Adds a timestamp to the specified message, and appends it to the internal log.

Start ( ) : void
Stop ( ) : void

비공개 메소드들

메소드 설명
FetchHandlers ( Assembly assembly ) : IEnumerable
FindHandlersInLoadedAssemblies ( ) : IEnumerable

Searches all the assemblies in the current AppDomain, and returns a collection of those that implement the IRequestHandler interface.

HandleRequest ( HttpListenerRequest request, HttpListenerResponse response ) : void

; Handles the specified request.

Defers execution to an appropriate request handler, except for requests to the reserved endpoints: ~/ and ~/Log.
Returns a default error message if an appropriate request handler can not be found.

RegisterHandlers ( ) : void

Searches all the assemblies in the current AppDomain for class definitions that implement the IRequestHandler interface. Those classes are instantiated and registered as request handlers.

RegisterHandlers ( IEnumerable handlers ) : void
ReleaseServer ( ) : void
RequestHandlerLogAppender_OnLogMessage ( Object sender, LogAppenderEventArgs logAppenderEventArgs ) : void
ServerOnLogMessage ( Object sender, LogAppenderEventArgs args ) : void

Writes the value of args.LogAppenderEventArgs.LogLine to the internal log.

ServiceFileRequest ( String wwwroot, HttpListenerRequest request, HttpListenerResponse response ) : void
ServiceLog ( HttpListenerRequest request, HttpListenerResponse response ) : System.Boolean

Services requests to ~/Log

ServiceRoot ( HttpListenerRequest request, HttpListenerResponse response ) : System.Boolean

Services requests to ~/

메소드 상세

GetWebRoot() 공개 정적인 메소드

Gets the full path to the directory where static pages are served from.
public static GetWebRoot ( ) : String
리턴 String

IntegratedWebServer() 공개 메소드

Initializes a new instance of the IntegratedWebServer class.
public IntegratedWebServer ( ) : System
리턴 System

LogMessage() 공개 정적인 메소드

Adds a timestamp to the specified message, and appends it to the internal log.
public static LogMessage ( String message, String label = null ) : void
message String
label String
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void