NewtonsoftJsonProtocolDependencyInjectionExtensions.AddNewtonsoftJsonProtocol 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
| AddNewtonsoftJsonProtocol<TBuilder>(TBuilder) |
Enables the JSON protocol for SignalR. |
| AddNewtonsoftJsonProtocol<TBuilder>(TBuilder, Action<NewtonsoftJsonHubProtocolOptions>) |
Enables the JSON protocol for SignalR and allows options for the JSON protocol to be configured. |
AddNewtonsoftJsonProtocol<TBuilder>(TBuilder)
Enables the JSON protocol for SignalR.
public static TBuilder AddNewtonsoftJsonProtocol<TBuilder> (this TBuilder builder) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder;
static member AddNewtonsoftJsonProtocol : 'Builder -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.SignalR.ISignalRBuilder)
<Extension()>
Public Function AddNewtonsoftJsonProtocol(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
- TBuilder
The value of builder
Remarks
This has no effect if the JSON protocol has already been enabled.
Applies to
AddNewtonsoftJsonProtocol<TBuilder>(TBuilder, Action<NewtonsoftJsonHubProtocolOptions>)
Enables the JSON protocol for SignalR and allows options for the JSON protocol to be configured.
public static TBuilder AddNewtonsoftJsonProtocol<TBuilder> (this TBuilder builder, Action<Microsoft.AspNetCore.SignalR.NewtonsoftJsonHubProtocolOptions> configure) where TBuilder : Microsoft.AspNetCore.SignalR.ISignalRBuilder;
static member AddNewtonsoftJsonProtocol : 'Builder * Action<Microsoft.AspNetCore.SignalR.NewtonsoftJsonHubProtocolOptions> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.SignalR.ISignalRBuilder)
<Extension()>
Public Function AddNewtonsoftJsonProtocol(Of TBuilder As ISignalRBuilder) (builder As TBuilder, configure As Action(Of NewtonsoftJsonHubProtocolOptions)) As TBuilder
Type Parameters
- TBuilder
Parameters
- builder
- TBuilder
The ISignalRBuilder representing the SignalR server to add JSON protocol support to.
- configure
- Action<NewtonsoftJsonHubProtocolOptions>
A delegate that can be used to configure the NewtonsoftJsonHubProtocolOptions
Returns
- TBuilder
The value of builder
Remarks
Any options configured here will be applied, even if the JSON protocol has already been registered with the server.