C# Класс GnomeServer.IntegratedWebServer

Наследование: IWebServer
Показать файл Открыть проект

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

Метод Описание
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