GetHttpContextExtensions.GetHttpContext 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetHttpContext(HubCallerContext) |
HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 |
GetHttpContext(HubConnectionContext) |
HttpContext從指定的連接取得,如果連接未與 HTTP 要求相關聯,則 |
GetHttpContext(HubCallerContext)
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)
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
為 。