diff --git a/build/BuildContext.csx b/build/BuildContext.csx index 19ea9a3..5d7a598 100644 --- a/build/BuildContext.csx +++ b/build/BuildContext.csx @@ -8,7 +8,6 @@ var root = FileUtils.GetScriptFolder(); var solutionFolder = Path.Combine(root,"..","src"); var projectFolder = Path.Combine(root, "..", "src", "LightInject.Interception"); - var testProjectFolder = Path.Combine(root, "..", "src", "LightInject.Interception.Tests"); var pathToTestAssembly = Path.Combine(testProjectFolder, "bin","release", "net46", "LightInject.Interception.Tests.dll"); 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; } } diff --git a/src/LightInject.Interception/LightInject.Interception.csproj b/src/LightInject.Interception/LightInject.Interception.csproj index f7c4595..505b217 100644 --- a/src/LightInject.Interception/LightInject.Interception.csproj +++ b/src/LightInject.Interception/LightInject.Interception.csproj @@ -1,7 +1,7 @@  net46;netstandard1.1;netstandard2.0 - 2.0.1 + 2.0.2 Bernhard Richter http//www.lightinject.net git