C# Класс GSF.Web.Hosting.WebServer

Represents the web server engine for WebPageController instances.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Dispose ( ) : void

Releases all the resources used by the WebServer object.

RenderResponse ( HttpRequestMessage request, string pageName, bool isPost, CancellationToken cancellationToken, object model = null, Type modelType = null, AdoDataConnection database = null ) : Task

Renders an HTTP response for a given request.

WebServer ( string webRootPath = null, IRazorEngine razorEngineCS = null, IRazorEngine razorEngineVB = null ) : System

Creates a new WebServer.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the WebServer object and optionally releases the managed resources.

Приватные методы

Метод Описание
GetConfiguredServer ( string settingsCategory = null, IRazorEngine razorEngineCS = null, IRazorEngine razorEngineVB = null ) : WebServer
GetResourceFileName ( string pageName, bool embeddedResource ) : string
OnExecutionException ( Exception exception ) : void
OnStatusMessage ( string message ) : void
OpenResourceAsync ( string fileName, bool embeddedResource, CancellationToken cancellationToken ) : Task
ProcessHTTPHandlerAsync ( string pageName, bool embeddedResource, HttpRequestMessage request, HttpResponseMessage response, CancellationToken cancellationToken ) : Task
PublishResponseContent ( HttpRequestMessage request, HttpResponseMessage response, long responseHash ) : bool
ResourceExists ( string fileName, bool embeddedResource ) : bool
WebServer ( ) : System
m_fileWatcher_FileChange ( object sender, FileSystemEventArgs e ) : void

Описание методов

Dispose() публичный Метод

Releases all the resources used by the WebServer object.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Releases the unmanaged resources used by the WebServer object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

RenderResponse() публичный Метод

Renders an HTTP response for a given request.
public RenderResponse ( HttpRequestMessage request, string pageName, bool isPost, CancellationToken cancellationToken, object model = null, Type modelType = null, AdoDataConnection database = null ) : Task
request System.Net.Http.HttpRequestMessage HTTP request message.
pageName string Name of page to render.
isPost bool trueif is HTTP post; otherwise, false.
cancellationToken System.Threading.CancellationToken Propagates notification from client that operations should be canceled.
model object Reference to model to use when rendering Razor templates, if any.
modelType System.Type Type of , if any.
database AdoDataConnection to use, if any.
Результат Task

WebServer() публичный Метод

Creates a new WebServer.
public WebServer ( string webRootPath = null, IRazorEngine razorEngineCS = null, IRazorEngine razorEngineVB = null ) : System
webRootPath string Root path for web server; defaults to template path for .
razorEngineCS IRazorEngine Razor engine instance for .cshtml templates; uses default instance if not provided.
razorEngineVB IRazorEngine Razor engine instance for .vbhtml templates; uses default instance if not provided.
Результат System