语言

DbConnectionInterceptionContext.Clone 方法

定义

创建截获上下文的副本以向其添加新状态时调用此方法。 使用此方法而不是直接调用构造函数可确保虚拟调度,使新类型与克隆的上下文具有相同的类型(和任何专用状态)。

protected override System.Data.Entity.Infrastructure.Interception.DbInterceptionContext Clone();
override this.Clone : unit -> System.Data.Entity.Infrastructure.Interception.DbInterceptionContext
Protected Overrides Function Clone () As DbInterceptionContext

返回

已复制所有状态的新上下文。

适用于