Skip to content

Commit

Permalink
Correct proxy type in InterfaceProxy.Invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
stakx committed Oct 17, 2019
1 parent 8f63ea1 commit 23da1cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Moq/ProxyFactories/InterfaceProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed override bool Equals(object obj)
{
// Forward this call to the interceptor, so that `object.Equals` can be set up.
var interceptor = (IInterceptor)((IProxy)this).Interceptor;
var invocation = new Invocation(interceptor.GetType(), equalsMethod, obj);
var invocation = new Invocation(this.GetType(), equalsMethod, obj);
interceptor.Intercept(invocation);
return (bool)invocation.ReturnValue;
}
Expand All @@ -38,7 +38,7 @@ public sealed override int GetHashCode()
{
// Forward this call to the interceptor, so that `object.GetHashCode` can be set up.
var interceptor = (IInterceptor)((IProxy)this).Interceptor;
var invocation = new Invocation(interceptor.GetType(), getHashCodeMethod);
var invocation = new Invocation(this.GetType(), getHashCodeMethod);
interceptor.Intercept(invocation);
return (int)invocation.ReturnValue;
}
Expand All @@ -49,7 +49,7 @@ public sealed override string ToString()
{
// Forward this call to the interceptor, so that `object.ToString` can be set up.
var interceptor = (IInterceptor)((IProxy)this).Interceptor;
var invocation = new Invocation(interceptor.GetType(), toStringMethod);
var invocation = new Invocation(this.GetType(), toStringMethod);
interceptor.Intercept(invocation);
return (string)invocation.ReturnValue;
}
Expand Down

0 comments on commit 23da1cb

Please sign in to comment.