IUserIdProvider.GetUserId(HubConnectionContext) 方法

定义

获取指定连接的用户 ID。

public:
 System::String ^ GetUserId(Microsoft::AspNetCore::SignalR::HubConnectionContext ^ connection);
public string GetUserId (Microsoft.AspNetCore.SignalR.HubConnectionContext connection);
public string? GetUserId (Microsoft.AspNetCore.SignalR.HubConnectionContext connection);
abstract member GetUserId : Microsoft.AspNetCore.SignalR.HubConnectionContext -> string
Public Function GetUserId (connection As HubConnectionContext) As String

参数

connection
HubConnectionContext

要获取其用户 ID 的连接。

返回

指定连接的用户 ID。

适用于