Dela via


HubProtocolExtensions.GetMessageBytes(IHubProtocol, HubMessage) Method

Definition

Converts the specified HubMessage to its serialized representation.

public:
[System::Runtime::CompilerServices::Extension]
 static cli::array <System::Byte> ^ GetMessageBytes(Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ hubProtocol, Microsoft::AspNetCore::SignalR::Protocol::HubMessage ^ message);
public static byte[] GetMessageBytes (this Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol hubProtocol, Microsoft.AspNetCore.SignalR.Protocol.HubMessage message);
static member GetMessageBytes : Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol * Microsoft.AspNetCore.SignalR.Protocol.HubMessage -> byte[]
<Extension()>
Public Function GetMessageBytes (hubProtocol As IHubProtocol, message As HubMessage) As Byte()

Parameters

hubProtocol
IHubProtocol

The hub protocol.

message
HubMessage

The message to convert to bytes.

Returns

Byte[]

The serialized representation of the specified message.

Applies to