Skip to content

Commit 8ed2197

Browse files
committed
Changed that dynamic proxy does not wrap proxies again with another proxy in some situations
1 parent 32265de commit 8ed2197

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Ninject.Extensions.Interception.DynamicProxy/DynamicProxyProxyFactory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public override void Dispose( bool disposing )
8989
/// <param name="reference">The <see cref="InstanceReference"/> to wrap.</param>
9090
public override void Wrap(IContext context, InstanceReference reference)
9191
{
92-
if (reference.Instance is IInterceptor)
92+
if (reference.Instance is IInterceptor ||
93+
reference.Instance is IProxyTargetAccessor)
9394
{
9495
return;
9596
}

0 commit comments

Comments
 (0)