语言

DbConnectionDispatcher.GetState(DbConnection, DbInterceptionContext) 方法

定义

public virtual System.Data.ConnectionState GetState(System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
override this.GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
Public Overridable Function GetState (connection As DbConnection, interceptionContext As DbInterceptionContext) As ConnectionState

参数

connection
DbConnection

将对其执行操作的连接。

interceptionContext
DbInterceptionContext

有关所发出调用上下文的可选信息。

返回

操作的结果,可能已被拦截器修改。

注解

请注意,此属性的值由此方法返回。 结果在传入此方法的拦截上下文中不可用,因为截获上下文是在传递给侦听器之前克隆的。

适用于