Skip to content

Commit

Permalink
Renamed MethodInvocationTarget to TargetMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
seesharper committed Aug 18, 2018
1 parent af65700 commit 31cc9f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/LightInject.Interception.Tests/InterceptorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void Execute_CompositeInterceptor_PassesMethodInvocationTargetToIntercept
var invocationMock = new Mock<IInvocationInfo>();
var method = typeof(IMethodWithNoParameters).GetMethods()[0];

invocationMock.SetupGet(i => i.MethodInvocationTarget).Returns(method);
invocationMock.SetupGet(i => i.TargetMethod).Returns(method);
var compositeInterceptor = new CompositeInterceptor(new[]
{
new Lazy<IInterceptor>(() => firstInterceptorMock.Object),
Expand All @@ -79,7 +79,7 @@ public void Execute_CompositeInterceptor_PassesMethodInvocationTargetToIntercept

compositeInterceptor.Invoke(invocationMock.Object);

firstInterceptorMock.Verify(i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.MethodInvocationTarget == method)));
firstInterceptorMock.Verify(i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.TargetMethod == method)));
}

[Fact]
Expand Down
8 changes: 4 additions & 4 deletions src/LightInject.Interception.Tests/ProxyBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void Execute_NonGenericMethod_PassesMethodInvocationTargetInfoToIntercept

interceptorMock.Verify(
i => i.Invoke(
It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethodInvocationTarget)));
It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethodInvocationTarget)));
}

[Fact]
Expand All @@ -272,7 +272,7 @@ public void Execute_NonGenericMethod_PassesMethodInvocationTargetInfoToIntercept
instance.Execute();

interceptorMock.Verify(
i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethod)));
i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethod)));
}

[Fact]
Expand All @@ -287,7 +287,7 @@ public void Execute_GenericMethod_PassesMethodInvocationTargetInfoToInterceptorW

interceptorMock.Verify(
i => i.Invoke(
It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethodInvocationTarget)));
It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethodInvocationTarget)));
}

[Fact]
Expand All @@ -300,7 +300,7 @@ public void Execute_GenericMethod_PassesMethodInvocationTargetInfoToInterceptorW
instance.Execute<int>(0);

interceptorMock.Verify(
i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethod)));
i => i.Invoke(It.Is<IInvocationInfo>(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethod)));
}

[Fact]
Expand Down
8 changes: 4 additions & 4 deletions src/LightInject.Interception/LightInject.Interception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public interface IInvocationInfo
/// <summary>
/// If the proxy is an interface, gets the <see cref="MethodInfo"/> currently being invoked on the target class.
/// </summary>
MethodInfo MethodInvocationTarget { get; }
MethodInfo TargetMethod { get; }

/// <summary>
/// Gets the <see cref="IProxy"/> instance that intercepted the method call.
Expand Down Expand Up @@ -675,7 +675,7 @@ public MethodInfo Method
/// <summary>
/// If the proxy is an interface, gets the <see cref="MethodInfo"/> currently being invoked on the target class.
/// </summary>
public MethodInfo MethodInvocationTarget
public MethodInfo TargetMethod
{
get
{
Expand Down Expand Up @@ -749,11 +749,11 @@ public MethodInfo Method
/// <summary>
/// If the proxy is an interface, gets the <see cref="MethodInfo"/> currently being invoked on the target class.
/// </summary>
public MethodInfo MethodInvocationTarget
public MethodInfo TargetMethod
{
get
{
return nextInvocationInfo.MethodInvocationTarget;
return nextInvocationInfo.TargetMethod;
}
}

Expand Down

0 comments on commit 31cc9f3

Please sign in to comment.