From 31cc9f3b3db255fb5727de5dc43c6687c1d639c7 Mon Sep 17 00:00:00 2001 From: Bernhard Richter Date: Sat, 18 Aug 2018 11:28:13 +0200 Subject: [PATCH] Renamed MethodInvocationTarget to TargetMethod --- src/LightInject.Interception.Tests/InterceptorTests.cs | 4 ++-- src/LightInject.Interception.Tests/ProxyBuilderTests.cs | 8 ++++---- src/LightInject.Interception/LightInject.Interception.cs | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/LightInject.Interception.Tests/InterceptorTests.cs b/src/LightInject.Interception.Tests/InterceptorTests.cs index 715c14e..3a09df8 100644 --- a/src/LightInject.Interception.Tests/InterceptorTests.cs +++ b/src/LightInject.Interception.Tests/InterceptorTests.cs @@ -70,7 +70,7 @@ public void Execute_CompositeInterceptor_PassesMethodInvocationTargetToIntercept var invocationMock = new Mock(); 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(() => firstInterceptorMock.Object), @@ -79,7 +79,7 @@ public void Execute_CompositeInterceptor_PassesMethodInvocationTargetToIntercept compositeInterceptor.Invoke(invocationMock.Object); - firstInterceptorMock.Verify(i => i.Invoke(It.Is(ii => ii.MethodInvocationTarget == method))); + firstInterceptorMock.Verify(i => i.Invoke(It.Is(ii => ii.TargetMethod == method))); } [Fact] diff --git a/src/LightInject.Interception.Tests/ProxyBuilderTests.cs b/src/LightInject.Interception.Tests/ProxyBuilderTests.cs index f9352be..0c742cf 100644 --- a/src/LightInject.Interception.Tests/ProxyBuilderTests.cs +++ b/src/LightInject.Interception.Tests/ProxyBuilderTests.cs @@ -259,7 +259,7 @@ public void Execute_NonGenericMethod_PassesMethodInvocationTargetInfoToIntercept interceptorMock.Verify( i => i.Invoke( - It.Is(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethodInvocationTarget))); + It.Is(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethodInvocationTarget))); } [Fact] @@ -272,7 +272,7 @@ public void Execute_NonGenericMethod_PassesMethodInvocationTargetInfoToIntercept instance.Execute(); interceptorMock.Verify( - i => i.Invoke(It.Is(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethod))); + i => i.Invoke(It.Is(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethod))); } [Fact] @@ -287,7 +287,7 @@ public void Execute_GenericMethod_PassesMethodInvocationTargetInfoToInterceptorW interceptorMock.Verify( i => i.Invoke( - It.Is(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethodInvocationTarget))); + It.Is(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethodInvocationTarget))); } [Fact] @@ -300,7 +300,7 @@ public void Execute_GenericMethod_PassesMethodInvocationTargetInfoToInterceptorW instance.Execute(0); interceptorMock.Verify( - i => i.Invoke(It.Is(ii => ii.Method == expectedMethod && ii.MethodInvocationTarget == expectedMethod))); + i => i.Invoke(It.Is(ii => ii.Method == expectedMethod && ii.TargetMethod == expectedMethod))); } [Fact] diff --git a/src/LightInject.Interception/LightInject.Interception.cs b/src/LightInject.Interception/LightInject.Interception.cs index 5c7e067..cd0532c 100644 --- a/src/LightInject.Interception/LightInject.Interception.cs +++ b/src/LightInject.Interception/LightInject.Interception.cs @@ -204,7 +204,7 @@ public interface IInvocationInfo /// /// If the proxy is an interface, gets the currently being invoked on the target class. /// - MethodInfo MethodInvocationTarget { get; } + MethodInfo TargetMethod { get; } /// /// Gets the instance that intercepted the method call. @@ -675,7 +675,7 @@ public MethodInfo Method /// /// If the proxy is an interface, gets the currently being invoked on the target class. /// - public MethodInfo MethodInvocationTarget + public MethodInfo TargetMethod { get { @@ -749,11 +749,11 @@ public MethodInfo Method /// /// If the proxy is an interface, gets the currently being invoked on the target class. /// - public MethodInfo MethodInvocationTarget + public MethodInfo TargetMethod { get { - return nextInvocationInfo.MethodInvocationTarget; + return nextInvocationInfo.TargetMethod; } }