JsonProtocolDependencyInjectionExtensions.AddJsonProtocol 方法

定义

重载

AddJsonProtocol<TBuilder>(TBuilder)

为 SignalR 启用 JSON 协议。

AddJsonProtocol<TBuilder>(TBuilder, Action<JsonHubProtocolOptions>)

启用 SignalR 的 JSON 协议,并允许配置 JSON 协议的选项。

AddJsonProtocol<TBuilder>(TBuilder)

Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs

为 SignalR 启用 JSON 协议。

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

类型参数

TBuilder

参数

builder
TBuilder

表示 ISignalRBuilder 要向其添加 JSON 协议支持的 SignalR 服务器的 。

返回

TBuilder

builder 的值

注解

如果已启用 JSON 协议,则这不起作用。

适用于

AddJsonProtocol<TBuilder>(TBuilder, Action<JsonHubProtocolOptions>)

Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs
Source:
JsonProtocolDependencyInjectionExtensions.cs

启用 SignalR 的 JSON 协议,并允许配置 JSON 协议的选项。

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

类型参数

TBuilder

参数

builder
TBuilder

表示 ISignalRBuilder 要向其添加 JSON 协议支持的 SignalR 服务器的 。

configure
Action<JsonHubProtocolOptions>

一个委托,可用于配置 JsonHubProtocolOptions

返回

TBuilder

builder 的值

注解

将应用此处配置的任何选项,即使 JSON 协议已向服务器注册。

适用于