Class
HttpServerHostContextBuilder
Represents a context constructor for HttpServerHostContext.
public sealed class HttpServerHostContextBuilderInheritance #
object ← HttpServerHostContextBuilder
Inherited Members #
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties #
| Name | Description |
|---|---|
| CatchConfigurationExceptions | Defines how the constructor should capture errors thrown within UsePortableConfiguration and display in the Console. |
| ServerConfiguration | Gets the Server Configuration object. |
Methods #
| Name | Description |
|---|---|
| Build() | Builds an HttpServerHostContext with the specified parameters. |
| UseAutoScan<TModule>() | This method is an shortcut for calling AutoScanModules. |
| UseAutoScan<TModule>(Assembly) | This method is an shortcut for calling AutoScanModules. |
| UseBootstraper(Action) | Adds an function that will be executed immediately before starting the HTTP server. |
| UseBootstraper(string, Action) | Adds an function that will be executed immediately before starting the HTTP server. |
| UseBootstraper(Func<Task>) | Adds an asynchronous function that will be executed immediately before starting the HTTP server. |
| UseBootstraper(string, Func<Task>) | Adds an asynchronous function that will be executed immediately before starting the HTTP server. |
| UseConfiguration(Action<HttpServerConfiguration>) | Calls an action that has the HTTP server configuration as an argument. |
| UseCors(Action<CrossOriginResourceSharingHeaders>) | Calls an action that has an CrossOriginResourceSharingHeaders instance from the main listening host as an argument. |
| UseCors(CrossOriginResourceSharingHeaders) | Sets an CrossOriginResourceSharingHeaders instance in the current listening host. |
| UseEngine(HttpServerEngine) | Sets the HTTP server engine. |
| UseEngine<TEngine>() | Sets the HTTP server engine using a default constructor. |
| UseEngine<TEngine>(Action<TEngine>) | Sets the HTTP server engine using a default constructor and applies the specified configuration action. |
| UseEngine<TEngine>(Func<TEngine>) | Sets the HTTP server engine using a factory method. |
| UseFileServer(string, string) | Configures a file server to serve static files from the specified root directory for the given router path. |
| UseFileServer(string, string, IRequestHandler[]?) | Configures a file server to serve static files from the specified root directory for the given router path, optionally applying custom request handlers. |
| UseFileServer(string, HttpFileServerHandler, IRequestHandler[]?) | Configures a file server to serve static files using the specified HttpFileServerHandler for the given router path, optionally applying custom request handlers. |
| UseForwardingResolver(ForwardingResolver) | This method is a shortcut for setting ForwardingResolver. |
| UseForwardingResolver<TForwardingResolver>() | This method is a shortcut for setting ForwardingResolver. |
| UseHandler<THandler>() | This method is an shortcut for calling RegisterHandler. |
| UseHandler(HttpServerHandler) | This method is an shortcut for calling RegisterHandler. |
| UseHttpServer(Action<HttpServer>) | Calls an action that has the HTTP server instance as an argument. |
| UseListeningPort(ushort) | Sets the main ListeningPort of this host builder. |
| UseListeningPort(string) | Sets the main ListeningPort of this host builder. |
| UseListeningPort(ListeningPort) | Sets the main ListeningPort of this host builder. |
| UseLocale(CultureInfo) | Changes the default thread current culture through DefaultThreadCurrentCulture. |
| UseMinimalConfiguration() | Configures the HTTP server with a minimal set of default settings. |
| UsePortableConfiguration(Action<PortableConfigurationBuilder>) | Enables the portable configuration for this application, which imports settings, parameters, and other information from a JSON settings file. |
| UseRouter(Action<Router>) | Calls an action that has an Router instance from the host HTTP server. |
| UseRouter(Router) | Sets an Router instance in the current listening host. |
| UseSsl(ListeningHostSslOptions) | Configures SSL for the listening host using the specified options. |
| UseSsl(X509Certificate2) | Configures SSL for the listening host using the specified certificate. |
| UseSsl() | Configures SSL for the listening host using a trusted development certificate for localhost and 127.0.0.1. |
| UseStartupMessage(string) | Add an optional message to the HttpServerHostContext output verbose. |
| UseStartupMessage(Func<string>) | Adds a function that returns an optional initialization message to the HttpServerHostContext output verbose. |