DefaultUserIdProvider.GetUserId(HubConnectionContext) 方法

定义

获取指定连接的用户 ID。

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

参数

connection
HubConnectionContext

要获取其用户 ID 的连接。

返回

指定连接的用户 ID。

实现

适用于