GetHttpContextExtensions.GetHttpContext 方法

定义

重载

GetHttpContext(HubCallerContext)

从指定的连接获取HttpContextnull;如果连接未与 HTTP 请求关联,则为 。

GetHttpContext(HubConnectionContext)

从指定的连接获取HttpContextnull;如果连接未与 HTTP 请求关联,则为 。

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则为 。

适用于