DefaultConnectionContext 类

定义

的默认实现 ConnectionContext

public ref class DefaultConnectionContext : Microsoft::AspNetCore::Connections::ConnectionContext, IDisposable, Microsoft::AspNetCore::Connections::Features::IConnectionIdFeature, Microsoft::AspNetCore::Connections::Features::IConnectionItemsFeature, Microsoft::AspNetCore::Connections::Features::IConnectionLifetimeFeature, Microsoft::AspNetCore::Connections::Features::IConnectionTransportFeature, Microsoft::AspNetCore::Connections::Features::IConnectionUserFeature
public ref class DefaultConnectionContext : Microsoft::AspNetCore::Connections::ConnectionContext, Microsoft::AspNetCore::Connections::Features::IConnectionEndPointFeature, Microsoft::AspNetCore::Connections::Features::IConnectionIdFeature, Microsoft::AspNetCore::Connections::Features::IConnectionItemsFeature, Microsoft::AspNetCore::Connections::Features::IConnectionLifetimeFeature, Microsoft::AspNetCore::Connections::Features::IConnectionTransportFeature, Microsoft::AspNetCore::Connections::Features::IConnectionUserFeature
public class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, IDisposable, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature
public class DefaultConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionEndPointFeature, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionLifetimeFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature
type DefaultConnectionContext = class
    inherit ConnectionContext
    interface IDisposable
    interface IConnectionIdFeature
    interface IConnectionItemsFeature
    interface IConnectionTransportFeature
    interface IConnectionUserFeature
    interface IConnectionLifetimeFeature
type DefaultConnectionContext = class
    inherit ConnectionContext
    interface IConnectionIdFeature
    interface IConnectionItemsFeature
    interface IConnectionTransportFeature
    interface IConnectionUserFeature
    interface IConnectionLifetimeFeature
    interface IConnectionEndPointFeature
Public Class DefaultConnectionContext
Inherits ConnectionContext
Implements IConnectionIdFeature, IConnectionItemsFeature, IConnectionLifetimeFeature, IConnectionTransportFeature, IConnectionUserFeature, IDisposable
Public Class DefaultConnectionContext
Inherits ConnectionContext
Implements IConnectionEndPointFeature, IConnectionIdFeature, IConnectionItemsFeature, IConnectionLifetimeFeature, IConnectionTransportFeature, IConnectionUserFeature
继承
DefaultConnectionContext
继承
实现

构造函数

DefaultConnectionContext()

DefaultConnectionContext创建不带管道的 ,以避免前期分配。 调用方应手动设置 TransportApplication 管道。

DefaultConnectionContext(String)

DefaultConnectionContext创建不带管道的 ,以避免前期分配。 调用方应手动设置 TransportApplication 管道。

DefaultConnectionContext(String, IDuplexPipe, IDuplexPipe)

使用给定 transport 的 和 application 管道创建 DefaultConnectionContext。

属性

Application

的默认实现 ConnectionContext

ConnectionClosed

获取或设置 CancellationToken 在连接关闭时触发的 。

ConnectionId

获取或设置连接标识符。

Features

获取此连接上可用的服务器和中间件提供的功能集合。

Items

获取或设置与连接关联的项。

LocalEndPoint

获取或设置本地 EndPoint

LocalEndPoint

获取或设置此连接的本地终结点。

(继承自 ConnectionContext)
RemoteEndPoint

获取或设置远程 EndPoint

RemoteEndPoint

获取或设置此连接的远程终结点。

(继承自 ConnectionContext)
Transport

获取或设置连接的传输。

User

获取或设置与连接关联的用户。

方法

Abort()

的默认实现 ConnectionContext

Abort()

中止基础连接。

(继承自 ConnectionContext)
Abort(ConnectionAbortedException)

中止基础连接。

Abort(ConnectionAbortedException)

中止基础连接。

(继承自 ConnectionContext)
Dispose()

的默认实现 ConnectionContext

DisposeAsync()

释放基础连接的资源。

DisposeAsync()

释放基础连接的资源。

(继承自 ConnectionContext)

扩展方法

GetHttpContext(ConnectionContext)

HttpContext获取与连接关联的 (如果有)。

适用于