JsonHubProtocol 類別

定義

使用 System.Text.Json 實作 SignalR 中樞通訊協定。

public ref class JsonHubProtocol : Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol
public ref class JsonHubProtocol sealed : Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol
public class JsonHubProtocol : Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol
public sealed class JsonHubProtocol : Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol
type JsonHubProtocol = class
    interface IHubProtocol
Public Class JsonHubProtocol
Implements IHubProtocol
Public NotInheritable Class JsonHubProtocol
Implements IHubProtocol
繼承
JsonHubProtocol
實作

建構函式

JsonHubProtocol()

初始化 JsonHubProtocol 類別的新執行個體。

JsonHubProtocol(IOptions<JsonHubProtocolOptions>)

初始化 JsonHubProtocol 類別的新執行個體。

屬性

Name

取得通訊協定的名稱。 SignalR 會使用名稱來解析用戶端與伺服器之間的通訊協定。

PayloadSerializer

取得序列化程式,用來序列化調用引數和傳回值。

TransferFormat

取得通訊協定的傳輸格式。

Version

取得通訊協定的主要版本。

方法

GetMessageBytes(HubMessage)

將指定的 HubMessage 轉換為其序列化表示。

IsVersionSupported(Int32)

取得值,指出通訊協定是否支援指定的版本。

TryParseMessage(ReadOnlySequence<Byte>, IInvocationBinder, HubMessage)

使用指定的系結器,從指定的序列化標記法建立新的 HubMessage

WriteMessage(HubMessage, IBufferWriter<Byte>)

將指定的 HubMessage 寫入器。

擴充方法

GetMessageBytes(IHubProtocol, HubMessage)

將指定的 HubMessage 轉換為其序列化表示。

適用於