HubConnectionBuilder class
A builder for configuring HubConnection instances.
Methods
build | Creates a HubConnection from the configuration options specified in this builder. |
configure |
Configures console logging for the HubConnection. |
configure |
Configures custom logging for the HubConnection. |
with |
Configures the HubConnection to use the specified Hub Protocol. |
with |
Configures the HubConnection to use HTTP-based transports to connect to the specified URL. The transport will be selected automatically based on what the server and client support. |
with |
Configures the HubConnection to use the specified HTTP-based transport to connect to the specified URL. |
with |
Configures the HubConnection to use HTTP-based transports to connect to the specified URL. |
Method Details
build
Creates a HubConnection from the configuration options specified in this builder.
function build()
Returns
configureLogging
Configures console logging for the HubConnection.
function configureLogging(logLevel: LogLevel)
Parameters
- logLevel
- LogLevel
The minimum level of messages to log. Anything at this level, or a more severe level, will be logged.
Returns
configureLogging
Configures custom logging for the HubConnection.
function configureLogging(logger: ILogger)
Parameters
- logger
- ILogger
An object implementing the ILogger interface, which will be used to write all log messages.
Returns
withHubProtocol
Configures the HubConnection to use the specified Hub Protocol.
function withHubProtocol(protocol: IHubProtocol)
Parameters
Returns
withUrl
Configures the HubConnection to use HTTP-based transports to connect to the specified URL. The transport will be selected automatically based on what the server and client support.
function withUrl(url: string)
Parameters
Returns
withUrl
Configures the HubConnection to use the specified HTTP-based transport to connect to the specified URL.
function withUrl(url: string, transportType: HttpTransportType)
Parameters
Returns
withUrl
Configures the HubConnection to use HTTP-based transports to connect to the specified URL.
function withUrl(url: string, options: IHttpConnectionOptions)