JsonProtocolDependencyInjectionExtensions.AddJsonProtocol Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddJsonProtocol<TBuilder>(TBuilder) |
Enables the JSON protocol for SignalR. |
AddJsonProtocol<TBuilder>(TBuilder, Action<JsonHubProtocolOptions>) |
Enables the JSON protocol for SignalR and allows options for the JSON protocol to be configured. |
AddJsonProtocol<TBuilder>(TBuilder)
Enables the JSON protocol for SignalR.
public static TBuilder AddJsonProtocol<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder;
static member AddJsonProtocol : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.SignalR.ISignalRBuilder)
<Extension()>
Public Function AddJsonProtocol(Of TBuilder As ISignalRBuilder) (builder As TBuilder) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
The ISignalRBuilder representing the SignalR server to add JSON protocol support to.
Returns
The value of builder
Remarks
This has no effect if the JSON protocol has already been enabled.
Applies to
AddJsonProtocol<TBuilder>(TBuilder, Action<JsonHubProtocolOptions>)
Enables the JSON protocol for SignalR and allows options for the JSON protocol to be configured.
public static TBuilder AddJsonProtocol<TBuilder> (this TBuilder builder, Action<Microsoft.AspNetCore.SignalR.JsonHubProtocolOptions> configure) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder;
static member AddJsonProtocol : 'Builder * Action<Microsoft.AspNetCore.SignalR.JsonHubProtocolOptions> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.SignalR.ISignalRBuilder)
<Extension()>
Public Function AddJsonProtocol(Of TBuilder As ISignalRBuilder) (builder As TBuilder, configure As Action(Of JsonHubProtocolOptions)) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
The ISignalRBuilder representing the SignalR server to add JSON protocol support to.
- configure
- Action<JsonHubProtocolOptions>
A delegate that can be used to configure the JsonHubProtocolOptions
Returns
The value of builder
Remarks
Any options configured here will be applied, even if the JSON protocol has already been registered with the server.