From a7d6463105746e57df45e4ec2fb363391c160b92 Mon Sep 17 00:00:00 2001 From: eeichinger Date: Tue, 3 Mar 2009 03:03:17 +0000 Subject: [PATCH] fixed "net 1.0 does not support "internal virtual" members" polishing --- .../DynamicProxy/InheritanceAopProxyTests.cs | 7 +++++++ .../NHibernate/Config/AopConfiguration.cs | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/InheritanceAopProxyTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/InheritanceAopProxyTests.cs index f5e78245..e9d79f08 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/InheritanceAopProxyTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/InheritanceAopProxyTests.cs @@ -205,6 +205,7 @@ namespace Spring.Aop.Framework.DynamicProxy Assert.AreEqual(3, ni.Count); } +#if !NET_1_0 [Test] public void DoesNotInterceptInternalMethod() { @@ -222,6 +223,7 @@ namespace Spring.Aop.Framework.DynamicProxy proxiedClass.InternalToDo(); Assert.AreEqual(0, ni.Count); } +#endif [Test] public void InterceptVirtualMethodThatBelongsToAnInterface() @@ -405,11 +407,16 @@ namespace Spring.Aop.Framework.DynamicProxy } +#if !NET_1_0 + // "internal virtual" is not supported on net 1.0 CLR + // see http://support.microsoft.com/?scid=kb%3Ben-us%3B317129&x=11&y=12 internal virtual void InternalToDo() { } +#endif + internal protected virtual void InternalProtectedToDo() { diff --git a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs index ae3fb49d..1a07ed2c 100644 --- a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs +++ b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs @@ -42,13 +42,18 @@ namespace Spring.Data.NHibernate.Config [SetUp] public void Setup() { -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -#endif + string aopConfigPath = + string.Format( + "assembly://{0}/Spring.Data.NHibernate.Config/AopConfiguration.xml" + , this.GetType().Assembly.GetName().Name); + ctx = new XmlApplicationContext(aopConfigPath); +//#if NH_2_1 +// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); +//#elif NH_2_0 +// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); +//#else +// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); +//#endif }