GetHttpContextExtensions.GetHttpContext 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetHttpContext(HubCallerContext) |
从指定的连接获取HttpContext |
GetHttpContext(HubConnectionContext) |
从指定的连接获取HttpContext |
GetHttpContext(HubCallerContext)
- Source:
- GetHttpContextExtensions.cs
- Source:
- GetHttpContextExtensions.cs
- Source:
- GetHttpContextExtensions.cs
从指定的连接获取HttpContextnull
;如果连接未与 HTTP 请求关联,则为 。
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)
- Source:
- GetHttpContextExtensions.cs
- Source:
- GetHttpContextExtensions.cs
- Source:
- GetHttpContextExtensions.cs
从指定的连接获取HttpContextnull
;如果连接未与 HTTP 请求关联,则为 。
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
则为 。