Class WebServerOptionsExtensions
Provides extension methods for WebServerOptions.
Inherited Members
Namespace: EmbedIO
Syntax
public static class WebServerOptionsExtensions
Methods
WithAutoLoadCertificate(WebServerOptions)
Instructs a WebServerOptions instance to automatically load the X.509 certificate.
Declaration
public static WebServerOptions WithAutoLoadCertificate(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithAutoLoadCertificate(WebServerOptions, Boolean)
Sets a value indicating whether to automatically load the X.509 certificate.
Declaration
public static WebServerOptions WithAutoLoadCertificate(this WebServerOptions this, bool value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Boolean | value | If true, automatically load the X.509 certificate. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithAutoRegisterCertificate(WebServerOptions)
Instructs a WebServerOptions instance to automatically bind the X.509 certificate to the port used for HTTPS.
Declaration
public static WebServerOptions WithAutoRegisterCertificate(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithAutoRegisterCertificate(WebServerOptions, Boolean)
Sets a value indicating whether to automatically bind the X.509 certificate to the port used for HTTPS.
Declaration
public static WebServerOptions WithAutoRegisterCertificate(this WebServerOptions this, bool value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Boolean | value | If true, automatically bind the X.509 certificate to the port used for HTTPS. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithCertificate(WebServerOptions, X509Certificate2)
Sets the X.509 certificate to use for SSL connections.
Declaration
public static WebServerOptions WithCertificate(this WebServerOptions this, X509Certificate2 value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
X509Certificate2 | value | The X.509 certificate to use for SSL connections. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithCertificateThumbprint(WebServerOptions, String)
Sets the thumbprint of the X.509 certificate to use for SSL connections.
Declaration
public static WebServerOptions WithCertificateThumbprint(this WebServerOptions this, string value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
String | value | The thumbprint of the X.509 certificate to use for SSL connections. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithEmbedIOHttpListener(WebServerOptions)
Sets the type of HTTP listener to EmbedIO.
Declaration
public static WebServerOptions WithEmbedIOHttpListener(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
WithMicrosoftHttpListener(WebServerOptions)
Sets the type of HTTP listener to Microsoft.
Declaration
public static WebServerOptions WithMicrosoftHttpListener(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
WithMode(WebServerOptions, HttpListenerMode)
Sets the type of HTTP listener.
Declaration
public static WebServerOptions WithMode(this WebServerOptions this, HttpListenerMode value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
HttpListenerMode | value | The type of HTTP listener. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithoutAutoLoadCertificate(WebServerOptions)
Instructs a WebServerOptions instance to not load the X.509 certificate automatically .
Declaration
public static WebServerOptions WithoutAutoLoadCertificate(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithoutAutoRegisterCertificate(WebServerOptions)
Instructs a WebServerOptions instance to not bind the X.509 certificate automatically.
Declaration
public static WebServerOptions WithoutAutoRegisterCertificate(this WebServerOptions this)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithStore(WebServerOptions, StoreName, StoreLocation)
Sets the name and location of the X.509 certificate store where to load the certificate from.
Declaration
public static WebServerOptions WithStore(this WebServerOptions this, StoreName name, StoreLocation location)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
StoreName | name | One of the |
StoreLocation | location | One of the |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithStoreLocation(WebServerOptions, StoreLocation)
Sets a value indicating the location of the X.509 certificate store where to load the certificate from.
Declaration
public static WebServerOptions WithStoreLocation(this WebServerOptions this, StoreLocation value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
StoreLocation | value | One of the |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithStoreName(WebServerOptions, StoreName)
Sets a value indicating the X.509 certificate store where to load the certificate from.
Declaration
public static WebServerOptions WithStoreName(this WebServerOptions this, StoreName value)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
StoreName | value | One of the |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithUrlPrefix(WebServerOptions, String)
Adds a URL prefix.
Declaration
public static WebServerOptions WithUrlPrefix(this WebServerOptions this, string prefix)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
String | prefix | The URL prefix. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithUrlPrefixes(WebServerOptions, IEnumerable<String>)
Adds zero or more URL prefixes.
Declaration
public static WebServerOptions WithUrlPrefixes(this WebServerOptions this, IEnumerable<string> urlPrefixes)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
IEnumerable<String> | urlPrefixes | An enumeration of URL prefixes to add. |
Returns
Type | Description |
---|---|
WebServerOptions |
|
WithUrlPrefixes(WebServerOptions, String[])
Adds zero or more URL prefixes.
Declaration
public static WebServerOptions WithUrlPrefixes(this WebServerOptions this, params string[] urlPrefixes)
Parameters
Type | Name | Description |
---|---|---|
WebServerOptions | this | The WebServerOptions on which this method is called. |
String[] | urlPrefixes | An array of URL prefixes to add. |
Returns
Type | Description |
---|---|
WebServerOptions |
|