共用方式為


GetHttpContextExtensions.GetHttpContext 方法

定義

多載

GetHttpContext(HubCallerContext)

HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 null 為 。

GetHttpContext(HubConnectionContext)

HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 null 為 。

GetHttpContext(HubCallerContext)

來源:
GetHttpContextExtensions.cs
來源:
GetHttpContextExtensions.cs
來源:
GetHttpContextExtensions.cs

HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 null 為 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Http::HttpContext ^ GetHttpContext(Microsoft::AspNetCore::SignalR::HubCallerContext ^ connection);
public static Microsoft.AspNetCore.Http.HttpContext GetHttpContext (this Microsoft.AspNetCore.SignalR.HubCallerContext connection);
public static Microsoft.AspNetCore.Http.HttpContext? GetHttpContext (this Microsoft.AspNetCore.SignalR.HubCallerContext connection);
static member GetHttpContext : Microsoft.AspNetCore.SignalR.HubCallerContext -> Microsoft.AspNetCore.Http.HttpContext
<Extension()>
Public Function GetHttpContext (connection As HubCallerContext) As HttpContext

參數

connection
HubCallerContext

連接。

傳回

HttpContext連線的 ,如果連接未與 HTTP 要求相關聯,則 null 為 。

適用於

GetHttpContext(HubConnectionContext)

來源:
GetHttpContextExtensions.cs
來源:
GetHttpContextExtensions.cs
來源:
GetHttpContextExtensions.cs

HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 null 為 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Http::HttpContext ^ GetHttpContext(Microsoft::AspNetCore::SignalR::HubConnectionContext ^ connection);
public static Microsoft.AspNetCore.Http.HttpContext GetHttpContext (this Microsoft.AspNetCore.SignalR.HubConnectionContext connection);
public static Microsoft.AspNetCore.Http.HttpContext? GetHttpContext (this Microsoft.AspNetCore.SignalR.HubConnectionContext connection);
static member GetHttpContext : Microsoft.AspNetCore.SignalR.HubConnectionContext -> Microsoft.AspNetCore.Http.HttpContext
<Extension()>
Public Function GetHttpContext (connection As HubConnectionContext) As HttpContext

參數

connection
HubConnectionContext

連接。

傳回

HttpContext連線的 ,如果連接未與 HTTP 要求相關聯,則 null 為 。

適用於