IHubProtocolResolver.GetProtocol(String, IReadOnlyList<String>) 方法

定义

如果受支持协议的指定列表允许,则获取具有指定名称的中心协议。

public:
 Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ GetProtocol(System::String ^ protocolName, System::Collections::Generic::IReadOnlyList<System::String ^> ^ supportedProtocols);
public Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol GetProtocol (string protocolName, System.Collections.Generic.IReadOnlyList<string> supportedProtocols);
public Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol? GetProtocol (string protocolName, System.Collections.Generic.IReadOnlyList<string>? supportedProtocols);
abstract member GetProtocol : string * System.Collections.Generic.IReadOnlyList<string> -> Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol
Public Function GetProtocol (protocolName As String, supportedProtocols As IReadOnlyList(Of String)) As IHubProtocol

参数

protocolName
String

协议名称。

supportedProtocols
IReadOnlyList<String>

支持的协议的集合。

返回

如果找不到匹配的协议,则为匹配 IHubProtocol 的 或 null

适用于