IUserIdProvider.GetUserId(HubConnectionContext) 方法

定義

取得指定連接的使用者識別碼。

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

要為其取得使用者識別碼的連線。

傳回

指定連接的使用者識別碼。

適用於