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