springnet-commits Mailing List for Spring Framework .NET
Brought to you by:
aseovic,
markpollack
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(33) |
Aug
(163) |
Sep
(491) |
Oct
(289) |
Nov
(336) |
Dec
(84) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(227) |
Feb
(413) |
Mar
(128) |
Apr
(232) |
May
(92) |
Jun
(299) |
Jul
(386) |
Aug
(228) |
Sep
(237) |
Oct
(426) |
Nov
(325) |
Dec
(405) |
2006 |
Jan
(315) |
Feb
(311) |
Mar
(152) |
Apr
(177) |
May
(443) |
Jun
(92) |
Jul
(88) |
Aug
(80) |
Sep
(288) |
Oct
(515) |
Nov
(1049) |
Dec
(440) |
2007 |
Jan
(179) |
Feb
(406) |
Mar
(294) |
Apr
(80) |
May
(432) |
Jun
(242) |
Jul
(452) |
Aug
(710) |
Sep
(206) |
Oct
(240) |
Nov
(65) |
Dec
(227) |
2008 |
Jan
(80) |
Feb
(90) |
Mar
(98) |
Apr
(136) |
May
(101) |
Jun
(12) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bruno B. <bb...@us...> - 2008-07-04 13:20:47
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21697 Modified Files: aop-aspect-library.xml Log Message: Fixed error in AspNetCache configuration. Index: aop-aspect-library.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/aop-aspect-library.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** aop-aspect-library.xml 4 Apr 2008 15:18:18 -0000 1.14 --- aop-aspect-library.xml 4 Jul 2008 13:20:40 -0000 1.15 *************** *** 190,194 **** <object id="AspNetCache" type="Spring.Caching.AspNetCache, Spring.Web"> <property name="SlidingExpiration" value="true"/> ! <property name="Priority" value="CachePriority.Low"/> <property name="TimeToLive" value="00:02:00"/> </object> --- 190,194 ---- <object id="AspNetCache" type="Spring.Caching.AspNetCache, Spring.Web"> <property name="SlidingExpiration" value="true"/> ! <property name="Priority" value="Low"/> <property name="TimeToLive" value="00:02:00"/> </object> |
From: Bruno B. <bb...@us...> - 2008-06-23 07:21:42
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv561/Util Modified Files: EventUtils.cs Log Message: Remove "throw ex" code. Index: EventUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/EventUtils.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EventUtils.cs 9 Apr 2006 07:19:00 -0000 1.5 --- EventUtils.cs 23 Jun 2008 07:21:38 -0000 1.6 *************** *** 70,74 **** { // unwrap the exception that actually caused the TargetInvocationException and throw that... ! throw ex.GetBaseException(); } } --- 70,74 ---- { // unwrap the exception that actually caused the TargetInvocationException and throw that... ! throw ReflectionUtils.UnwrapTargetInvocationException(ex); } } |
From: Bruno B. <bb...@us...> - 2008-06-23 07:21:42
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Threading In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv561/Threading Modified Files: Semaphore.cs Log Message: Remove "throw ex" code. Index: Semaphore.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Threading/Semaphore.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Semaphore.cs 15 Sep 2006 21:30:09 -0000 1.10 --- Semaphore.cs 23 Jun 2008 07:21:38 -0000 1.11 *************** *** 89,96 **** --nPermits; } ! catch (ThreadInterruptedException ex) { Monitor.Pulse(this); ! throw ex; } } --- 89,96 ---- --nPermits; } ! catch (ThreadInterruptedException) { Monitor.Pulse(this); ! throw; } } *************** *** 136,143 **** } } ! catch (ThreadInterruptedException ex) { Monitor.Pulse(this); ! throw ex; } } --- 136,143 ---- } } ! catch (ThreadInterruptedException) { Monitor.Pulse(this); ! throw; } } |
From: Bruno B. <bb...@us...> - 2008-06-23 07:21:06
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32725 Modified Files: PropertyComparator.cs Log Message: Remove "throw ex" code. Index: PropertyComparator.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Support/PropertyComparator.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PropertyComparator.cs 31 Jul 2007 00:09:03 -0000 1.12 --- PropertyComparator.cs 23 Jun 2008 07:21:02 -0000 1.13 *************** *** 160,167 **** propertyValue = ow.GetPropertyValue(this.sortDefinition.Property); } ! catch (InvalidPropertyException ex) { // the property doesn't exist in the first place, so let exception through... ! throw ex; } catch (ObjectsException ex) --- 160,167 ---- propertyValue = ow.GetPropertyValue(this.sortDefinition.Property); } ! catch (InvalidPropertyException) { // the property doesn't exist in the first place, so let exception through... ! throw; } catch (ObjectsException ex) |
From: Bruno B. <bb...@us...> - 2008-06-23 07:19:55
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/Adapter In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32205 Modified Files: ThrowsAdviceInterceptor.cs Log Message: Remove "throw ex" code. Index: ThrowsAdviceInterceptor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceInterceptor.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ThrowsAdviceInterceptor.cs 4 May 2007 13:16:44 -0000 1.8 --- ThrowsAdviceInterceptor.cs 23 Jun 2008 07:19:51 -0000 1.9 *************** *** 234,238 **** { LookupAndInvokeAnyHandler(ex, invocation); ! throw ex; } } --- 234,238 ---- { LookupAndInvokeAnyHandler(ex, invocation); ! throw; } } *************** *** 313,317 **** catch (TargetInvocationException ex) { ! throw ex.InnerException; } } --- 313,317 ---- catch (TargetInvocationException ex) { ! throw ReflectionUtils.UnwrapTargetInvocationException(ex); } } |
From: Marko L. <la...@us...> - 2008-06-09 10:57:23
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests/Scheduling/Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13005 Modified Files: SchedulerFactoryObjectTest.cs Log Message: Fixes to resource based configuration reading, whitespace is trimmed from keys and values and only first '=' match is used Index: SchedulerFactoryObjectTest.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests/Scheduling/Quartz/SchedulerFactoryObjectTest.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SchedulerFactoryObjectTest.cs 9 Jun 2008 10:03:50 -0000 1.3 --- SchedulerFactoryObjectTest.cs 9 Jun 2008 10:57:18 -0000 1.4 *************** *** 17,21 **** --- 17,24 ---- using System; using System.Collections; + using System.Collections.Specialized; + using System.IO; using System.Reflection; + using System.Text; using System.Threading; *************** *** 27,30 **** --- 30,35 ---- using Rhino.Mocks; + using Spring.Core.IO; + namespace Spring.Scheduling.Quartz { *************** *** 36,40 **** public class SchedulerFactoryObjectTest { ! private MockRepository mockery = null; private SchedulerFactoryObject factory; --- 41,47 ---- public class SchedulerFactoryObjectTest { ! private static readonly MethodInfo m_InitSchedulerFactory = typeof(SchedulerFactoryObject).GetMethod("InitSchedulerFactory", ! BindingFlags.Instance | BindingFlags.NonPublic); ! private MockRepository mockery; private SchedulerFactoryObject factory; *************** *** 262,271 **** { TestSchedulerFactory.Mockery.ReplayAll(); - MethodInfo mi = factory.GetType().GetMethod("InitSchedulerFactory", - BindingFlags.Instance | BindingFlags.NonPublic); factory.SchedulerName = "testFactoryObject"; StdSchedulerFactory factoryToPass = new StdSchedulerFactory(); ! mi.Invoke(factory, new object[] { factoryToPass }); } --- 269,308 ---- { TestSchedulerFactory.Mockery.ReplayAll(); factory.SchedulerName = "testFactoryObject"; StdSchedulerFactory factoryToPass = new StdSchedulerFactory(); ! m_InitSchedulerFactory.Invoke(factory, new object[] { factoryToPass }); ! } ! ! [Test] ! public void TestInitSchedulerFactory_ConfigLocationReadingShouldPreserverExtraEqualsMarksAndTrimKeysAndValues() ! { ! const string ConnectionStringValue = "Server=(local);Database=quartz;Trusted_Connection=True;"; ! const string ConnectionStringKey = "quartz.dataSource.default.connectionString"; ! string configuration = ! @"quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz ! quartz.jobStore.useProperties = false ! quartz.jobStore.dataSource = default" + Environment.NewLine + ! ConnectionStringKey+ " = " + ConnectionStringValue + Environment.NewLine + ! "quartz.dataSource.default.provider = SqlServer-20"; ! ! // initialize data ! MemoryStream ms = new MemoryStream(); ! byte[] data = Encoding.UTF8.GetBytes(configuration); ! ms.Write(data, 0, data.Length); ! ms.Seek(0, SeekOrigin.Begin); ! ms.Position = 0; ! ! // intercept call ! InterceptingStdSChedulerFactory factoryToPass = new InterceptingStdSChedulerFactory(); ! ! TestSchedulerFactory.Mockery.ReplayAll(); ! ! factory.ConfigLocation = new TestConfigLocation(ms, "description"); ! ! m_InitSchedulerFactory.Invoke(factory, new object[] { factoryToPass }); ! ! Assert.AreEqual(ConnectionStringValue, factoryToPass.Properties[ConnectionStringKey]); ! } *************** *** 283,286 **** --- 320,330 ---- } + internal class TestConfigLocation : InputStreamResource + { + public TestConfigLocation(Stream inputStream, string description) : base(inputStream, description) + { + } + } + public class TestSchedulerFactory : ISchedulerFactory { *************** *** 319,322 **** --- 363,379 ---- } + public class InterceptingStdSChedulerFactory : StdSchedulerFactory + { + private NameValueCollection properties; + + public override void Initialize(NameValueCollection props) + { + this.properties = props; + } + public NameValueCollection Properties + { + get { return properties; } + } + } } |
From: Marko L. <la...@us...> - 2008-06-09 10:57:15
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12988 Modified Files: SchedulerFactoryObject.cs Log Message: Fixes to resource based configuration reading, whitespace is trimmed from keys and values and only first '=' match is used Index: SchedulerFactoryObject.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SchedulerFactoryObject.cs 9 Jun 2008 10:03:14 -0000 1.5 --- SchedulerFactoryObject.cs 9 Jun 2008 10:57:07 -0000 1.6 *************** *** 698,707 **** { string line; ! while ((line =sr.ReadLine()) != null) { ! string[] lineItems = line.Split('='); if (lineItems.Length == 2) { ! mergedProps[lineItems[0]] = lineItems[1]; } } --- 698,707 ---- { string line; ! while ((line = sr.ReadLine()) != null) { ! string[] lineItems = line.Split(new char[] { '=' }, 2); if (lineItems.Length == 2) { ! mergedProps[lineItems[0].Trim()] = lineItems[1].Trim(); } } |
From: Marko L. <la...@us...> - 2008-06-09 10:03:52
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests/Scheduling/Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24066 Modified Files: SchedulerFactoryObjectTest.cs Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging Index: SchedulerFactoryObjectTest.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests/Scheduling/Quartz/SchedulerFactoryObjectTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SchedulerFactoryObjectTest.cs 14 Sep 2007 12:56:10 -0000 1.2 --- SchedulerFactoryObjectTest.cs 9 Jun 2008 10:03:50 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- using System; using System.Collections; + using System.Reflection; using System.Threading; *************** *** 257,260 **** --- 258,273 ---- } + [Test] + public void TestInitSchedulerFactory_MinimalDefaults() + { + TestSchedulerFactory.Mockery.ReplayAll(); + MethodInfo mi = factory.GetType().GetMethod("InitSchedulerFactory", + BindingFlags.Instance | BindingFlags.NonPublic); + + factory.SchedulerName = "testFactoryObject"; + StdSchedulerFactory factoryToPass = new StdSchedulerFactory(); + mi.Invoke(factory, new object[] { factoryToPass }); + } + [TearDown] public void TearDown() |
From: Marko L. <la...@us...> - 2008-06-09 10:03:44
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24047/Spring.Scheduling.Quartz.Tests Modified Files: Spring.Scheduling.Quartz.Tests.2005.csproj Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging Index: Spring.Scheduling.Quartz.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Tests/Spring.Scheduling.Quartz.Tests.2005.csproj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Spring.Scheduling.Quartz.Tests.2005.csproj 1 Dec 2007 20:37:21 -0000 1.4 --- Spring.Scheduling.Quartz.Tests.2005.csproj 9 Jun 2008 10:03:40 -0000 1.5 *************** *** 1,3 **** ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> --- 1,3 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> *************** *** 10,13 **** --- 10,18 ---- <RootNamespace>Spring</RootNamespace> <AssemblyName>Spring.Scheduling.Quartz.Tests</AssemblyName> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>2.0</OldToolsVersion> + <UpgradeBackupLocation> + </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
From: Marko L. <la...@us...> - 2008-06-09 10:03:44
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Integration.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24047/Spring.Scheduling.Quartz.Integration.Tests Modified Files: Spring.Scheduling.Quartz.Integration.Tests.2005.csproj Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging Index: Spring.Scheduling.Quartz.Integration.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/test/Spring/Spring.Scheduling.Quartz.Integration.Tests/Spring.Scheduling.Quartz.Integration.Tests.2005.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Spring.Scheduling.Quartz.Integration.Tests.2005.csproj 11 Sep 2007 09:34:02 -0000 1.2 --- Spring.Scheduling.Quartz.Integration.Tests.2005.csproj 9 Jun 2008 10:03:40 -0000 1.3 *************** *** 1,3 **** ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> --- 1,3 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> *************** *** 10,13 **** --- 10,18 ---- <RootNamespace>Spring</RootNamespace> <AssemblyName>Spring.Scheduling.Quartz.Integration.Tests</AssemblyName> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>2.0</OldToolsVersion> + <UpgradeBackupLocation> + </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
From: Marko L. <la...@us...> - 2008-06-09 10:03:18
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24017 Added Files: Spring.Scheduling.Quartz.2008.sln Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging --- NEW FILE: Spring.Scheduling.Quartz.2008.sln --- (This appears to be a binary file; contents omitted.) |
From: Marko L. <la...@us...> - 2008-06-09 10:03:18
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24017/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz Modified Files: SchedulerFactoryObject.cs Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging Index: SchedulerFactoryObject.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SchedulerFactoryObject.cs 1 Dec 2007 20:37:08 -0000 1.4 --- SchedulerFactoryObject.cs 9 Jun 2008 10:03:14 -0000 1.5 *************** *** 710,714 **** } ! MergePropertiesIntoMap(quartzProperties, mergedProps); --- 710,718 ---- } ! if (quartzProperties != null) ! { ! // if given quartz properties, merge to them to configuration ! MergePropertiesIntoMap(quartzProperties, mergedProps); ! } |
From: Marko L. <la...@us...> - 2008-06-09 10:03:18
|
Update of /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24017/src/Spring/Spring.Scheduling.Quartz Modified Files: Spring.Scheduling.Quartz.2005.csproj Log Message: Support for VS2008 and small fix to check whether quartz properties is null before merging Index: Spring.Scheduling.Quartz.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net.Integration/projects/Spring.Scheduling.Quartz/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.2005.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Spring.Scheduling.Quartz.2005.csproj 11 Sep 2007 09:33:50 -0000 1.2 --- Spring.Scheduling.Quartz.2005.csproj 9 Jun 2008 10:03:14 -0000 1.3 *************** *** 1,3 **** ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> --- 1,3 ---- ! <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> *************** *** 10,13 **** --- 10,18 ---- <RootNamespace>Spring</RootNamespace> <AssemblyName>Spring.Scheduling.Quartz</AssemblyName> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>2.0</OldToolsVersion> + <UpgradeBackupLocation> + </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
From: Mark P. <mar...@us...> - 2008-05-30 21:12:02
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14693 Modified Files: Spring.Data.NHibernate.Integration.Tests.2005.csproj Log Message: udpate nh mappings. Index: Spring.Data.NHibernate.Integration.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate.Integration.Tests.2005.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Spring.Data.NHibernate.Integration.Tests.2005.csproj 3 Apr 2008 05:41:46 -0000 1.9 --- Spring.Data.NHibernate.Integration.Tests.2005.csproj 30 May 2008 21:11:55 -0000 1.10 *************** *** 85,93 **** <ItemGroup> <EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" /> ! <Content Include="Data\NHibernate\Credit.hbm.xml" /> <Content Include="Data\NHibernate\creditdebit.sql" /> ! <Content Include="Data\NHibernate\Debit.hbm.xml" /> <Content Include="Data\NHibernate\MultipleDbTests.xml" /> ! <Content Include="Data\NHibernate\NHDAOTests.xml" /> <EmbeddedResource Include="Data\NHibernate\templateTests.xml" /> <EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" /> --- 85,93 ---- <ItemGroup> <EmbeddedResource Include="Data\NHibernate\dbProviderTemplateTests.xml" /> ! <EmbeddedResource Include="Data\NHibernate\Credit.hbm.xml" /> <Content Include="Data\NHibernate\creditdebit.sql" /> ! <EmbeddedResource Include="Data\NHibernate\Debit.hbm.xml" /> <Content Include="Data\NHibernate\MultipleDbTests.xml" /> ! <EmbeddedResource Include="Data\NHibernate\NHDAOTests.xml" /> <EmbeddedResource Include="Data\NHibernate\templateTests.xml" /> <EmbeddedResource Include="Data\NHibernate\TestObject.hbm.xml" /> |
From: Mark P. <mar...@us...> - 2008-05-30 21:12:02
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14693/Data/NHibernate Modified Files: Credit.hbm.xml Debit.hbm.xml NHDAOTests.cs NHDAOTests.xml Log Message: udpate nh mappings. Index: Credit.hbm.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/Credit.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Credit.hbm.xml 31 May 2007 20:25:14 -0000 1.1 --- Credit.hbm.xml 30 May 2008 21:11:55 -0000 1.2 *************** *** 1,6 **** <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate.Integration.Tests" ! table="Credits"> <id name="CreditID" column="CreditID" type="Int32"> <generator class="identity" /> --- 1,6 ---- <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class name="Spring.Data.NHibernate.Credit, Spring.Data.NHibernate.Integration.Tests" ! table="Credits" lazy="false"> <id name="CreditID" column="CreditID" type="Int32"> <generator class="identity" /> Index: NHDAOTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NHDAOTests.cs 31 May 2007 20:25:14 -0000 1.1 --- NHDAOTests.cs 30 May 2008 21:11:55 -0000 1.2 *************** *** 28,31 **** --- 28,32 ---- using Spring.Context.Support; using Spring.Data.Common; + using Spring.Data.NHibernate.Support; #endregion *************** *** 72,75 **** --- 73,81 ---- ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/NHDAOTests.xml"); + ctx.Name = AbstractApplicationContext.DefaultRootContextName; + if (!ContextRegistry.IsContextRegistered(AbstractApplicationContext.DefaultRootContextName)) + { + ContextRegistry.RegisterContext(ctx); + } } *************** *** 88,93 **** --- 94,113 ---- #endif } + [Test] + public void SessionScopeOutsideTransaction() + { + float transferAmount = 113; + using (new SessionScope()) + { + IAccountManager mgr = null; + mgr = ctx["accountManager"] as IAccountManager; + Assert.IsNotNull(mgr, "accountManager not of expected type. Type = " + ctx["accountManager"].GetType().ToString()); + mgr.DoTransfer(transferAmount, transferAmount); + } + } + + [Test] public void DeclarativeWithAttributes() { *************** *** 109,116 **** Assert.IsTrue(DoesNotContainNewData(transferAmount)); } - else - { - Assert.Fail("Should have thrown an exception in DAO layer"); - } } } --- 129,132 ---- Index: NHDAOTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NHDAOTests.xml 7 Aug 2007 19:50:49 -0000 1.2 --- NHDAOTests.xml 30 May 2008 21:11:55 -0000 1.3 *************** *** 4,17 **** <db:provider id="DbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! <object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate"> ! <!-- TODO Provide dedicated NHibernate Schema --> - <!-- If you specify DbProvider then don't specify the connection string below. - <property name="DbProvider" ref="DbProvider"/> - --> <property name="MappingAssemblies"> --- 4,14 ---- <db:provider id="DbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=CreditsAndDebits;User ID=springqa;Password=springqa"/> ! <object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate12"> ! <property name="DbProvider" ref="DbProvider"/> <property name="MappingAssemblies"> *************** *** 25,32 **** <entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> ! ! <entry key="hibernate.connection.connection_string" ! value="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! <entry key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect"/> --- 22,26 ---- <entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> ! <entry key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect"/> *************** *** 74,78 **** <object id="hibernateTransactionManager" ! type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate"> <!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from the session factory. --> --- 68,72 ---- <object id="hibernateTransactionManager" ! type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate12"> <!-- Comment out DbProvider if you want to have the tx mgr infer the DbProvider from the session factory. --> Index: Debit.hbm.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/Debit.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Debit.hbm.xml 31 May 2007 20:25:14 -0000 1.1 --- Debit.hbm.xml 30 May 2008 21:11:55 -0000 1.2 *************** *** 1,6 **** <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate.Integration.Tests" ! table="Debits"> <id name="DebitID" column="DebitID" type="Int32"> <generator class="identity" /> --- 1,6 ---- <?xml version="1.0" encoding="utf-8" ?> ! <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"> <class name="Spring.Data.NHibernate.Debit, Spring.Data.NHibernate.Integration.Tests" ! table="Debits" lazy="false"> <id name="DebitID" column="DebitID" type="Int32"> <generator class="identity" /> |
From: Mark P. <mar...@us...> - 2008-05-30 21:10:08
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13646/Data/Objects Modified Files: AdoQueryTests.cs Added Files: AbstractAdoQueryTests.cs AdoOperationTests.cs StoredProcedureTests.cs Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses --- NEW FILE: AdoOperationTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: AbstractAdoQueryTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: StoredProcedureTests.cs --- (This appears to be a binary file; contents omitted.) Index: AdoQueryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Objects/AdoQueryTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AdoQueryTests.cs 25 Jul 2007 08:25:34 -0000 1.3 --- AdoQueryTests.cs 30 May 2008 21:10:00 -0000 1.4 *************** *** 18,21 **** --- 18,40 ---- #endregion + #region License + + /* + * Copyright © 2002-2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #endregion #region Imports *************** *** 23,29 **** using System.Collections; using System.Data; ! using DotNetMock.Dynamic; using NUnit.Framework; using Rhino.Mocks; using Spring.Data.Common; --- 42,49 ---- using System.Collections; using System.Data; ! using System.Data.SqlClient; using NUnit.Framework; using Rhino.Mocks; + using Spring.Dao; using Spring.Data.Common; *************** *** 33,64 **** { /// <summary> ! /// This class contains tests for AdoQuery subclasses /// </summary> /// <author>Mark Pollack</author> /// <version>$Id$</version> [TestFixture] ! public class AdoQueryTests { ! private MockRepository mocks; [SetUp] public void Setup() { ! mocks = new MockRepository(); } ! /* [Test] ! public void QueryWithoutContextRhino() { ! IDbProvider provider = (IDbProvider) mocks.DynamicMock(typeof (IDbProvider)); ! ! IDbConnection connection = (IDbConnection) mocks.DynamicMock(typeof (IDbConnection)); ! ! Expect.Call(provider.CreateConnection()).Return(connection); ! ! IDbCommand command = (IDbCommand) mocks.DynamicMock(typeof (IDbCommand)); ! ! IDataReader reader = (IDataReader) mocks.DynamicMock(typeof (IDataReader)); Expect.Call(reader.Read()).Return(true); Expect.Call(reader.GetInt32(0)).Return(1); --- 53,81 ---- { /// <summary> ! /// Tests for AdoQuery /// </summary> /// <author>Mark Pollack</author> /// <version>$Id$</version> [TestFixture] ! public class AdoQueryTests : AbstractAdoQueryTests { ! ! private static string SELECT_ID_WHERE = "select id from custmr"; ! private static string[] COLUMN_NAMES = new string[] {"id", "forename"}; ! private static DbType[] COLUMN_TYPES = new DbType[] {DbType.Int32, DbType.String}; [SetUp] public void Setup() { ! SetUpMocks(); ! ! } ! [Test] ! public void MappingAdoQueryWithContextWithoutParams() { ! IDataReader reader = (IDataReader)mocks.DynamicMock(typeof(IDataReader)); Expect.Call(reader.Read()).Return(true); Expect.Call(reader.GetInt32(0)).Return(1); *************** *** 66,73 **** Expect.Call(command.ExecuteReader()).Return(reader); - Expect.Call(provider.CreateCommand()).Return(command); - mocks.ReplayAll(); ! IntMappingQueryWithNoContext queryWithNoContext = new IntMappingQueryWithNoContext(provider); queryWithNoContext.Compile(); IList list = queryWithNoContext.QueryByNamedParam(null, null); --- 83,89 ---- Expect.Call(command.ExecuteReader()).Return(reader); ! mocks.ReplayAll(); ! IntMappingQueryWithContext queryWithNoContext = new IntMappingQueryWithContext(provider); queryWithNoContext.Compile(); IList list = queryWithNoContext.QueryByNamedParam(null, null); *************** *** 79,142 **** mocks.VerifyAll(); - - - } ! */ [Test] ! public void QueryWithoutContext() { ! //Prepare provider ! IDynamicMock mockProvider = new DynamicMock(typeof(IDbProvider)); ! ! //Prepare connection to return from provider ! IDynamicMock mockConnection = new DynamicMock(typeof(IDbConnection)); ! IDbConnection connection = (IDbConnection) mockConnection.Object; ! mockProvider.ExpectAndReturn("CreateConnection", connection); ! ! //Prepare command ! IDynamicMock mockCommand = new DynamicMock(typeof(IDbCommand)); ! ! //Prepare reader to return from command ! IDynamicMock mockReader = new DynamicMock(typeof (IDataReader)); ! mockReader.ExpectAndReturn("Read", true); ! mockReader.ExpectAndReturn("GetInt32", 1, 0); ! mockReader.ExpectAndReturn("Read", false); ! IDataReader reader = (IDataReader) mockReader.Object; ! mockCommand.ExpectAndReturn("ExecuteReader", reader); ! ! //Preppare command to return from provider ! IDbCommand command = (IDbCommand)mockCommand.Object; ! mockProvider.ExpectAndReturn("CreateCommand", command); ! ! IDbProvider dbProvider = (IDbProvider)mockProvider.Object; ! ! ! //Test MappingAdoQueryWithContext ! IntMappingQueryWithNoContext queryWithNoContext = new IntMappingQueryWithNoContext(dbProvider); ! queryWithNoContext.Compile(); ! //IList list = queryWithNoContext.QueryByNamedParam(null, null); ! IList list = queryWithNoContext.Query(); ! Assert.IsTrue(list.Count != 0); ! foreach (int count in list) ! { ! Assert.AreEqual(1, count); ! } ! ! ! ! ! } ! public class IntMappingQueryWithNoContext : MappingAdoQueryWithContext { private static string sql = "select id from custmr"; ! public IntMappingQueryWithNoContext(IDbProvider dbProvider) : base(dbProvider, sql) { --- 95,131 ---- mocks.VerifyAll(); } ! [Test] ! [ExpectedException(typeof(InvalidDataAccessApiUsageException))] ! public void QueryWithoutEnoughParams() { + SqlParameter sqlParameter1 = new SqlParameter(); + Expect.Call(command.CreateParameter()).Return(sqlParameter1); + Expect.Call(provider.CreateParameterNameForCollection(COLUMN_NAMES[0])).Return("@" + COLUMN_NAMES[0]); ! SqlParameter sqlParameter2 = new SqlParameter(); ! Expect.Call(command.CreateParameter()).Return(sqlParameter2); ! Expect.Call(provider.CreateParameterNameForCollection(COLUMN_NAMES[1])).Return("@" + COLUMN_NAMES[1]); ! mocks.ReplayAll(); + IntMappingAdoQuery query = new IntMappingAdoQuery(); + query.DbProvider = provider; + query.Sql = SELECT_ID_WHERE; + query.DeclaredParameters.Add(COLUMN_NAMES[0], COLUMN_TYPES[0]); + query.DeclaredParameters.Add(COLUMN_NAMES[1], COLUMN_TYPES[1]); + query.Compile(); + IList list = query.Query(); + mocks.VerifyAll(); } ! ! public class IntMappingQueryWithContext : MappingAdoQueryWithContext { private static string sql = "select id from custmr"; ! public IntMappingQueryWithContext(IDbProvider dbProvider) : base(dbProvider, sql) { *************** *** 153,156 **** --- 142,153 ---- } } + + public class IntMappingAdoQuery : MappingAdoQuery + { + protected override object MapRow(IDataReader reader, int rowNum) + { + return reader.GetInt32(0); + } + } } |
From: Mark P. <mar...@us...> - 2008-05-30 21:10:07
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13646 Modified Files: Spring.Data.Tests.2005.csproj Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses Index: Spring.Data.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2005.csproj,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Spring.Data.Tests.2005.csproj 27 May 2008 19:07:03 -0000 1.35 --- Spring.Data.Tests.2005.csproj 30 May 2008 21:10:00 -0000 1.36 *************** *** 176,179 **** --- 176,182 ---- <Compile Include="Data\Core\TxScopeTransactionManagerIntegrationTests.cs" /> <Compile Include="Data\Core\TxScopeTransactionManagerTests.cs" /> + <Compile Include="Data\Objects\AbstractAdoQueryTests.cs" /> + <Compile Include="Data\Objects\AdoOperationTests.cs" /> + <Compile Include="Data\Objects\StoredProcedureTests.cs" /> <Compile Include="Transaction\Interceptor\AbstractTransactionAspectTests.cs" /> <Compile Include="Transaction\Interceptor\TransactionAttributeSourceTests.cs" /> |
From: Mark P. <mar...@us...> - 2008-05-30 21:09:48
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13633 Modified Files: MappingAdoQueryTests.cs TestObjectQuery.cs Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses Index: MappingAdoQueryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/MappingAdoQueryTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MappingAdoQueryTests.cs 13 Nov 2006 07:05:00 -0000 1.3 --- MappingAdoQueryTests.cs 30 May 2008 21:09:45 -0000 1.4 *************** *** 85,90 **** { TestObjectQuery testObjectQuery = new TestObjectQuery(dbProvider); ! IList testObjectList = testObjectQuery.QueryByNamedParam(null, null); ! Assert.AreEqual(3, testObjectList.Count); } --- 85,92 ---- { TestObjectQuery testObjectQuery = new TestObjectQuery(dbProvider); ! IDictionary inParams = new Hashtable(); ! inParams.Add("UName", "George"); ! IList testObjectList = testObjectQuery.QueryByNamedParam(inParams); ! Assert.AreEqual(2, testObjectList.Count); } Index: TestObjectQuery.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/TestObjectQuery.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestObjectQuery.cs 12 Jun 2006 08:43:41 -0000 1.2 --- TestObjectQuery.cs 30 May 2008 21:09:45 -0000 1.3 *************** *** 38,49 **** public class TestObjectQuery : MappingAdoQuery { ! private static string sql = "select TestObjectNo, Age, Name from TestObjects"; public TestObjectQuery(IDbProvider dbProvider) : base(dbProvider, sql) ! { CommandType = CommandType.Text; } ! protected override object MapRow(IDataReader reader, int num) { --- 38,58 ---- public class TestObjectQuery : MappingAdoQuery { ! private static string sql = "select TestObjectNo, Age, Name from TestObjects where Name = @UName"; public TestObjectQuery(IDbProvider dbProvider) : base(dbProvider, sql) ! { ! //DeclaredParameters = new DbParameters(dbProvider); ! try ! { ! DeclaredParameters.Add("UName", SqlDbType.VarChar, 50); ! } catch (Exception e) ! { ! Console.WriteLine(e); ! } CommandType = CommandType.Text; + Compile(); } ! protected override object MapRow(IDataReader reader, int num) { |
From: Mark P. <mar...@us...> - 2008-05-30 21:09:35
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/Generic In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13610 Modified Files: AdoOperation.cs Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses Index: AdoOperation.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/Generic/AdoOperation.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AdoOperation.cs 25 Jul 2007 13:32:39 -0000 1.2 --- AdoOperation.cs 30 May 2008 21:09:32 -0000 1.3 *************** *** 90,94 **** DbProvider = provider; Sql = sql; - DeclaredParameters = adoTemplate.CreateDbParameters(); } --- 90,93 ---- *************** *** 127,130 **** --- 126,133 ---- { adoTemplate.DbProvider = value; + if (DeclaredParameters == null) + { + DeclaredParameters = new DbParameters(value); + } } get |
From: Mark P. <mar...@us...> - 2008-05-30 21:09:25
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13589/Objects Modified Files: AbstractAdoOperation.cs AdoOperation.cs AdoQuery.cs Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses Index: AdoOperation.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AdoOperation.cs 7 Dec 2007 08:09:52 -0000 1.14 --- AdoOperation.cs 30 May 2008 21:09:22 -0000 1.15 *************** *** 88,93 **** //intialized AdoTemplate with the DbProvider DbProvider = provider; ! Sql = sql; ! DeclaredParameters = adoTemplate.CreateDbParameters(); } --- 88,92 ---- //intialized AdoTemplate with the DbProvider DbProvider = provider; ! Sql = sql; } *************** *** 125,129 **** set { ! adoTemplate.DbProvider = value; } get --- 124,132 ---- set { ! adoTemplate.DbProvider = value; ! if (DeclaredParameters == null) ! { ! DeclaredParameters = new DbParameters(value); ! } } get Index: AbstractAdoOperation.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/AbstractAdoOperation.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractAdoOperation.cs 24 Jul 2007 21:01:11 -0000 1.1 --- AbstractAdoOperation.cs 30 May 2008 21:09:22 -0000 1.2 *************** *** 201,204 **** --- 201,205 ---- } } + if (inParamValues != null) { Index: AdoQuery.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/AdoQuery.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AdoQuery.cs 25 Jul 2007 08:25:20 -0000 1.7 --- AdoQuery.cs 30 May 2008 21:09:22 -0000 1.8 *************** *** 76,80 **** public IList QueryByNamedParam(IDictionary inParams, IDictionary returnedParameters) { ! return QueryByNamedParam(inParams, null, null); } --- 76,80 ---- public IList QueryByNamedParam(IDictionary inParams, IDictionary returnedParameters) { ! return QueryByNamedParam(inParams, returnedParameters, null); } |
From: Mark P. <mar...@us...> - 2008-05-30 21:09:25
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13589/Common Modified Files: DbParameter.cs Log Message: SPRNET-954 - DeclaredParameters property is not property initialized in AdoOperation subclasses Index: DbParameter.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/DbParameter.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DbParameter.cs 3 Dec 2006 08:25:46 -0000 1.5 --- DbParameter.cs 30 May 2008 21:09:22 -0000 1.6 *************** *** 29,33 **** { /// <summary> ! /// TODO: /// </summary> /// <author>Mark Pollack (.NET)</author> --- 29,33 ---- { /// <summary> ! /// A parameter class used by <see cref="DbParametersBuilder"/> /// </summary> /// <author>Mark Pollack (.NET)</author> |
From: Mark P. <mar...@us...> - 2008-05-29 17:26:44
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12444 Modified Files: MethodMapTransactionAttributeSource.cs NameMatchTransactionAttributeSource.cs Log Message: SPRNET-955 : Provide better error message if dbprovider name is not found in thread local storage when using MultiDelegatingDbProvider SPRNET-956 - Provide better error message if assembly name is not provided when specying method signature for MethodMapTransactionAttributeSource misc code cleanup. Index: MethodMapTransactionAttributeSource.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/MethodMapTransactionAttributeSource.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MethodMapTransactionAttributeSource.cs 27 May 2008 19:06:57 -0000 1.14 --- MethodMapTransactionAttributeSource.cs 29 May 2008 17:26:41 -0000 1.15 *************** *** 114,118 **** --- 114,124 ---- public void AddTransactionalMethod( string name, ITransactionAttribute attribute ) { + AssertUtils.ArgumentNotNull(name, "name"); int lastCommaIndex = name.LastIndexOf( "," ); + if (lastCommaIndex == -1) + { + throw new ArgumentException("'" + name + "'" + + " is not a valid method name, missing AssemblyName. Format is FQN.MethodName, AssemblyName."); + } string fqnWithMethod = name.Substring(0, lastCommaIndex); Index: NameMatchTransactionAttributeSource.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Interceptor/NameMatchTransactionAttributeSource.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NameMatchTransactionAttributeSource.cs 27 May 2008 19:06:57 -0000 1.8 --- NameMatchTransactionAttributeSource.cs 29 May 2008 17:26:41 -0000 1.9 *************** *** 41,44 **** --- 41,45 ---- /// Logger available to subclasses, static for optimal serialization /// </summary> + [NonSerialized()] protected static readonly ILog log = LogManager.GetLogger(typeof(NameMatchTransactionAttributeSource)); |
From: Mark P. <mar...@us...> - 2008-05-29 17:26:38
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12417/Objects Modified Files: MappingAdoQuery.cs MappingAdoQueryWithContext.cs Log Message: SPRNET-955 : Provide better error message if dbprovider name is not found in thread local storage when using MultiDelegatingDbProvider SPRNET-956 - Provide better error message if assembly name is not provided when specying method signature for MethodMapTransactionAttributeSource misc code cleanup. Index: MappingAdoQueryWithContext.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/MappingAdoQueryWithContext.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MappingAdoQueryWithContext.cs 17 Jul 2007 04:33:44 -0000 1.3 --- MappingAdoQueryWithContext.cs 29 May 2008 17:26:35 -0000 1.4 *************** *** 48,52 **** /// Initializes a new instance of the <see cref="MappingAdoQueryWithContext"/> class. /// </summary> ! public MappingAdoQueryWithContext() { --- 48,52 ---- /// Initializes a new instance of the <see cref="MappingAdoQueryWithContext"/> class. /// </summary> ! public MappingAdoQueryWithContext() { Index: MappingAdoQuery.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Objects/MappingAdoQuery.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MappingAdoQuery.cs 17 Jul 2007 04:33:44 -0000 1.4 --- MappingAdoQuery.cs 29 May 2008 17:26:35 -0000 1.5 *************** *** 35,39 **** /// </summary> /// <remarks> ! /// Simplifies MappingSqlQueryWithContext API by dropping parameters and /// context. Most subclasses won't care about parameters. If you don't use /// contextual information, subclass this instead of MappingSqlQueryWithContext. --- 35,39 ---- /// </summary> /// <remarks> ! /// Simplifies MappingAdoQueryWithContext API by dropping parameters and /// context. Most subclasses won't care about parameters. If you don't use /// contextual information, subclass this instead of MappingSqlQueryWithContext. |
From: Mark P. <mar...@us...> - 2008-05-29 17:26:38
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12417/Common Modified Files: MultiDelegatingDbProvider.cs Log Message: SPRNET-955 : Provide better error message if dbprovider name is not found in thread local storage when using MultiDelegatingDbProvider SPRNET-956 - Provide better error message if assembly name is not provided when specying method signature for MethodMapTransactionAttributeSource misc code cleanup. Index: MultiDelegatingDbProvider.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MultiDelegatingDbProvider.cs 29 Jan 2008 18:15:38 -0000 1.4 --- MultiDelegatingDbProvider.cs 29 May 2008 17:26:35 -0000 1.5 *************** *** 23,26 **** --- 23,27 ---- using System.Data; using Spring.Collections; + using Spring.Dao; using Spring.Data.Common; using Spring.Objects.Factory; *************** *** 256,260 **** { string dbProviderName = (string)LogicalThreadContext.GetData("dbProviderName"); ! return (IDbProvider)targetDbProviders[dbProviderName]; } } --- 257,266 ---- { string dbProviderName = (string)LogicalThreadContext.GetData("dbProviderName"); ! if (targetDbProviders.Contains(dbProviderName)) ! { ! return (IDbProvider)targetDbProviders[dbProviderName]; ! } ! throw new InvalidDataAccessApiUsageException("'" + dbProviderName + "'" ! + "was not under the thread local key 'dbProviderName'"); } } |
From: Erich E. <oak...@us...> - 2008-05-29 12:13:32
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv17021/src/Spring/Spring.Core/Objects/Factory/Support Modified Files: AbstractAutowireCapableObjectFactory.cs AbstractObjectFactory.cs Log Message: SPRNET-953 SPRNET-952 SPRNET-949 SPRNET-948 SPRNET-947 Index: AbstractAutowireCapableObjectFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** AbstractAutowireCapableObjectFactory.cs 5 May 2008 22:42:17 -0000 1.89 --- AbstractAutowireCapableObjectFactory.cs 29 May 2008 12:13:27 -0000 1.90 *************** *** 97,102 **** /// </remarks> /// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param> ! protected AbstractAutowireCapableObjectFactory(bool caseSensitive) : this(caseSensitive, null) ! {} /// <summary> --- 97,103 ---- /// </remarks> /// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param> ! protected AbstractAutowireCapableObjectFactory(bool caseSensitive) ! : this(caseSensitive, null) ! { } /// <summary> *************** *** 112,116 **** /// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param> /// <param name="parentFactory">The parent object factory, or <see langword="null"/> if none.</param> ! protected AbstractAutowireCapableObjectFactory(bool caseSensitive, IObjectFactory parentFactory) : base(caseSensitive, parentFactory) { this.IgnoreDependencyInterface(typeof(IObjectFactoryAware)); --- 113,118 ---- /// <param name="caseSensitive">Flag specifying whether to make this object factory case sensitive or not.</param> /// <param name="parentFactory">The parent object factory, or <see langword="null"/> if none.</param> ! protected AbstractAutowireCapableObjectFactory(bool caseSensitive, IObjectFactory parentFactory) ! : base(caseSensitive, parentFactory) { this.IgnoreDependencyInterface(typeof(IObjectFactoryAware)); *************** *** 239,243 **** { // clear return type found: all factory methods return same type... ! return (Type) ObjectUtils.EnumerateFirstElement(returnTypes); } else --- 241,245 ---- { // clear return type found: all factory methods return same type... ! return (Type)ObjectUtils.EnumerateFirstElement(returnTypes); } else *************** *** 265,269 **** if (definition != null) { ! log.Debug(string.Format( "configuring object '{0}' using definition '{1}'", instance, name )); ApplyPropertyValues(name, definition, new ObjectWrapper(instance), definition.PropertyValues); } --- 267,271 ---- if (definition != null) { ! log.Debug(string.Format("configuring object '{0}' using definition '{1}'", instance, name)); ApplyPropertyValues(name, definition, new ObjectWrapper(instance), definition.PropertyValues); } *************** *** 400,404 **** } } ! return (string[]) result.ToArray(typeof(string)); } --- 402,406 ---- } } ! return (string[])result.ToArray(typeof(string)); } *************** *** 459,463 **** if (!continueWithPropertyPopulation) { ! return; } --- 461,465 ---- if (!continueWithPropertyPopulation) { ! return; } *************** *** 468,472 **** if (properties.PropertyValues.Length > 0) { ! throw new ObjectCreationException(definition.ResourceDescription, name, "Cannot apply property values to null instance."); } --- 470,474 ---- if (properties.PropertyValues.Length > 0) { ! throw new ObjectCreationException(definition.ResourceDescription, name, "Cannot apply property values to null instance."); } *************** *** 556,560 **** if (handlerValue.Source is RuntimeObjectReference) { ! RuntimeObjectReference roref = (RuntimeObjectReference) handlerValue.Source; handler = ResolveReference(definition, name, eventName, roref); } --- 558,562 ---- if (handlerValue.Source is RuntimeObjectReference) { ! RuntimeObjectReference roref = (RuntimeObjectReference)handlerValue.Source; handler = ResolveReference(definition, name, eventName, roref); } *************** *** 866,874 **** log.Debug("Eagerly caching object '" + name + "' to allow for resolving potential circular references"); } ! AddSingleton(name, instance); eagerlyCached = true; } ! instance = ConfigureObject(name, definition, instanceWrapper); } catch (ObjectCreationException) --- 868,876 ---- log.Debug("Eagerly caching object '" + name + "' to allow for resolving potential circular references"); } ! AddEagerlyCachedSingleton(name, definition, instance); eagerlyCached = true; } ! instance = ConfigureObject(name, definition, instanceWrapper); } catch (ObjectCreationException) *************** *** 876,880 **** if (eagerlyCached) { ! RemoveSingleton(name); } throw; --- 878,882 ---- if (eagerlyCached) { ! RemoveEagerlyCachedSingleton(name, definition); } throw; *************** *** 884,888 **** if (eagerlyCached) { ! RemoveSingleton(name); } throw new ObjectCreationException(definition.ResourceDescription, name, "Initialization of object failed : " + ex.Message, ex); --- 886,890 ---- if (eagerlyCached) { ! RemoveEagerlyCachedSingleton(name, definition); } throw new ObjectCreationException(definition.ResourceDescription, name, "Initialization of object failed : " + ex.Message, ex); *************** *** 892,895 **** --- 894,926 ---- /// <summary> + /// Add the created, but yet unpopulated singleton to the singleton cache + /// to be able to resolve circular references + /// </summary> + /// <param name="objectName">the name of the object to add to the cache.</param> + /// <param name="objectDefinition">the definition used to create and populated the object.</param> + /// <param name="rawSingletonInstance">the raw object instance.</param> + /// <remarks> + /// Derived classes may override this method to select the right cache based on the object definition. + /// </remarks> + protected virtual void AddEagerlyCachedSingleton(string objectName, IObjectDefinition objectDefinition, object rawSingletonInstance) + { + base.AddSingleton(objectName, rawSingletonInstance); + } + + /// <summary> + /// Remove the specified singleton from the singleton cache that has + /// been added before by a call to <see cref="AddEagerlyCachedSingleton"/> + /// </summary> + /// <param name="objectName">the name of the object to remove from the cache.</param> + /// <param name="objectDefinition">the definition used to create and populated the object.</param> + /// <remarks> + /// Derived classes may override this method to select the right cache based on the object definition. + /// </remarks> + protected virtual void RemoveEagerlyCachedSingleton(string objectName, IObjectDefinition objectDefinition) + { + base.RemoveSingleton(objectName); + } + + /// <summary> /// Creates an <see cref="IObjectWrapper"/> instance from the <see cref="RootObjectDefinition"/> passed in <paramref name="definition"/> /// using constructor <paramref name="arguments"/> *************** *** 911,915 **** instanceWrapper = AutowireConstructor(name, definition, arguments); } ! else if (definition.ResolvedAutowireMode == AutoWiringMode.Constructor || definition.HasConstructorArgumentValues) { --- 942,946 ---- instanceWrapper = AutowireConstructor(name, definition, arguments); } ! else if (definition.ResolvedAutowireMode == AutoWiringMode.Constructor || definition.HasConstructorArgumentValues) { *************** *** 1032,1037 **** } // if we get here, we found a factory method... ! ! if (ReflectionUtils.GetMethodByArgumentValues(new MethodInfo[]{factoryMethod}, arguments) == null) { continue; --- 1063,1068 ---- } // if we get here, we found a factory method... ! ! if (ReflectionUtils.GetMethodByArgumentValues(new MethodInfo[] { factoryMethod }, arguments) == null) { continue; *************** *** 1093,1097 **** searchType.FindMembers(MemberTypes.Method, methodFlags, new MemberFilter(new CriteriaMemberFilter().FilterMemberByCriteria), methodCriteria); ! return (MethodInfo[]) ArrayList.Adapter(methods).ToArray(typeof(MethodInfo)); } --- 1124,1128 ---- searchType.FindMembers(MemberTypes.Method, methodFlags, new MemberFilter(new CriteriaMemberFilter().FilterMemberByCriteria), methodCriteria); ! return (MethodInfo[])ArrayList.Adapter(methods).ToArray(typeof(MethodInfo)); } *************** *** 1137,1143 **** methodType, valueHolder.Value, parameterType, ex.Message); ! unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j,parameterType, errorMessage); ! ! return null; } --- 1168,1174 ---- methodType, valueHolder.Value, parameterType, ex.Message); ! unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage); ! ! return null; } *************** *** 1152,1156 **** methodType); unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage); ! return null; } --- 1183,1187 ---- methodType); unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage); ! return null; } *************** *** 1170,1174 **** parameterName, name); unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage); ! return null; } --- 1201,1205 ---- parameterName, name); unsatisfiedDependencyExceptionData = new UnsatisfiedDependencyExceptionData(j, parameterType, errorMessage); ! return null; } *************** *** 1299,1307 **** if (i == constructors.Length - 1 && constructorToUse == null) { ! throw new UnsatisfiedDependencyException(definition.ResourceDescription, ! name, ! unsatisfiedDependencyExceptionData.ParameterIndex, ! unsatisfiedDependencyExceptionData.ParameterType, ! unsatisfiedDependencyExceptionData.ErrorMessage); } // try next constructor... --- 1330,1338 ---- if (i == constructors.Length - 1 && constructorToUse == null) { ! throw new UnsatisfiedDependencyException(definition.ResourceDescription, ! name, ! unsatisfiedDependencyExceptionData.ParameterIndex, ! unsatisfiedDependencyExceptionData.ParameterType, ! unsatisfiedDependencyExceptionData.ErrorMessage); } // try next constructor... *************** *** 1379,1383 **** foreach (DictionaryEntry de in definition.ConstructorArgumentValues.IndexedArgumentValues) { ! int index = (int) de.Key; if (index < 0) { --- 1410,1414 ---- foreach (DictionaryEntry de in definition.ConstructorArgumentValues.IndexedArgumentValues) { ! int index = (int)de.Key; if (index < 0) { *************** *** 1389,1398 **** } string argName = "constructor argument with index " + index; ! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) de.Value; object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value); ! resolvedValues.AddIndexedArgumentValue(index, resolvedValue, StringUtils.HasText(valueHolder.Type) ! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName ! : null); } foreach (ConstructorArgumentValues.ValueHolder valueHolder in definition.ConstructorArgumentValues.GenericArgumentValues) --- 1420,1429 ---- } string argName = "constructor argument with index " + index; ! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder)de.Value; object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value); ! resolvedValues.AddIndexedArgumentValue(index, resolvedValue, StringUtils.HasText(valueHolder.Type) ! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName ! : null); } foreach (ConstructorArgumentValues.ValueHolder valueHolder in definition.ConstructorArgumentValues.GenericArgumentValues) *************** *** 1400,1413 **** string argName = "constructor argument"; object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value); ! resolvedValues.AddGenericArgumentValue(resolvedValue, StringUtils.HasText(valueHolder.Type) ! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName ! : null); } foreach (DictionaryEntry namedArgumentEntry in definition.ConstructorArgumentValues.NamedArgumentValues) { ! string argumentName = (string) namedArgumentEntry.Key; string syntheticArgumentName = "constructor argument with name " + argumentName; ! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder) namedArgumentEntry.Value; object resolvedValue = ResolveValueIfNecessary(name, definition, syntheticArgumentName, valueHolder.Value); resolvedValues.AddNamedArgumentValue(argumentName, resolvedValue); --- 1431,1444 ---- string argName = "constructor argument"; object resolvedValue = ResolveValueIfNecessary(name, definition, argName, valueHolder.Value); ! resolvedValues.AddGenericArgumentValue(resolvedValue, StringUtils.HasText(valueHolder.Type) ! ? TypeResolutionUtils.ResolveType(valueHolder.Type).AssemblyQualifiedName ! : null); } foreach (DictionaryEntry namedArgumentEntry in definition.ConstructorArgumentValues.NamedArgumentValues) { ! string argumentName = (string)namedArgumentEntry.Key; string syntheticArgumentName = "constructor argument with name " + argumentName; ! ConstructorArgumentValues.ValueHolder valueHolder = (ConstructorArgumentValues.ValueHolder)namedArgumentEntry.Value; object resolvedValue = ResolveValueIfNecessary(name, definition, syntheticArgumentName, valueHolder.Value); resolvedValues.AddNamedArgumentValue(argumentName, resolvedValue); *************** *** 1448,1452 **** return; } ! PropertyInfo[] filteredPropInfo = FilterPropertyInfoForDependencyCheck(wrapper); if (HasInstantiationAwareBeanPostProcessors) --- 1479,1483 ---- return; } ! PropertyInfo[] filteredPropInfo = FilterPropertyInfoForDependencyCheck(wrapper); if (HasInstantiationAwareBeanPostProcessors) *************** *** 1483,1487 **** if (unsatisfied) { ! throw new UnsatisfiedDependencyException(definition.ResourceDescription, name, property.Name, "Set this property value or disable dependency checking for this object."); } --- 1514,1518 ---- if (unsatisfied) { ! throw new UnsatisfiedDependencyException(definition.ResourceDescription, name, property.Name, "Set this property value or disable dependency checking for this object."); } *************** *** 1500,1511 **** lock (filteredPropertyDescriptorsCache) { ! PropertyInfo[] filtered = (PropertyInfo[]) filteredPropertyDescriptorsCache[wrapper.WrappedType]; if (filtered == null) { ! ArrayList list = new ArrayList(wrapper.GetPropertyInfos()); ! for (int i = list.Count -1 ; i >= 0; i--) { ! PropertyInfo pi = (PropertyInfo) list[i]; if (IsExcludedFromDependencyCheck(pi)) { --- 1531,1542 ---- lock (filteredPropertyDescriptorsCache) { ! PropertyInfo[] filtered = (PropertyInfo[])filteredPropertyDescriptorsCache[wrapper.WrappedType]; if (filtered == null) { ! ArrayList list = new ArrayList(wrapper.GetPropertyInfos()); ! for (int i = list.Count - 1; i >= 0; i--) { ! PropertyInfo pi = (PropertyInfo)list[i]; if (IsExcludedFromDependencyCheck(pi)) { *************** *** 1513,1518 **** } } ! ! filtered = (PropertyInfo[]) list.ToArray(typeof(PropertyInfo)); filteredPropertyDescriptorsCache.Add(wrapper.WrappedType, filtered); } --- 1544,1549 ---- } } ! ! filtered = (PropertyInfo[])list.ToArray(typeof(PropertyInfo)); filteredPropertyDescriptorsCache.Add(wrapper.WrappedType, filtered); } *************** *** 1572,1576 **** #endregion ! ((IInitializingObject) target).AfterPropertiesSet(); } if (StringUtils.HasText(definition.InitMethodName)) --- 1603,1607 ---- #endregion ! ((IInitializingObject)target).AfterPropertiesSet(); } if (StringUtils.HasText(definition.InitMethodName)) *************** *** 1634,1638 **** { // #%&^! try to find the method with a boolean "force" parameter ! targetMethod = target.GetType().GetMethod(destroyMethodName, MethodResolutionFlags, null, new Type[] {typeof(bool)}, null); if (targetMethod != null) { --- 1665,1669 ---- { // #%&^! try to find the method with a boolean "force" parameter ! targetMethod = target.GetType().GetMethod(destroyMethodName, MethodResolutionFlags, null, new Type[] { typeof(bool) }, null); if (targetMethod != null) { *************** *** 1650,1654 **** else { ! object[] args = usingForcingVersion ? new object[] {true} : ObjectUtils.EmptyObjects; try { --- 1681,1685 ---- else { ! object[] args = usingForcingVersion ? new object[] { true } : ObjectUtils.EmptyObjects; try { *************** *** 1717,1721 **** try { ! ((IDisposable) target).Dispose(); } catch (Exception ex) --- 1748,1752 ---- try { ! ((IDisposable)target).Dispose(); } catch (Exception ex) *************** *** 1819,1823 **** { // contains an IObjectDefinition with name and aliases... ! ObjectDefinitionHolder holder = (ObjectDefinitionHolder) argumentValue; resolvedValue = ResolveInnerObjectDefinition(name, holder.ObjectName, argumentName, holder.ObjectDefinition, definition.IsSingleton); } --- 1850,1854 ---- { // contains an IObjectDefinition with name and aliases... ! ObjectDefinitionHolder holder = (ObjectDefinitionHolder)argumentValue; resolvedValue = ResolveInnerObjectDefinition(name, holder.ObjectName, argumentName, holder.ObjectDefinition, definition.IsSingleton); } *************** *** 1825,1840 **** { // resolve plain IObjectDefinition, without contained name: use dummy name... ! IObjectDefinition def = (IObjectDefinition) argumentValue; ! resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton); } else if (argumentValue is RuntimeObjectReference) { ! RuntimeObjectReference roref = (RuntimeObjectReference) argumentValue; resolvedValue = ResolveReference(definition, name, argumentName, roref); } else if (argumentValue is ExpressionHolder) { ! ExpressionHolder expHolder = (ExpressionHolder) argumentValue; object context = null; IDictionary variables = null; --- 1856,1871 ---- { // resolve plain IObjectDefinition, without contained name: use dummy name... ! IObjectDefinition def = (IObjectDefinition)argumentValue; ! resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton); } else if (argumentValue is RuntimeObjectReference) { ! RuntimeObjectReference roref = (RuntimeObjectReference)argumentValue; resolvedValue = ResolveReference(definition, name, argumentName, roref); } else if (argumentValue is ExpressionHolder) { ! ExpressionHolder expHolder = (ExpressionHolder)argumentValue; object context = null; IDictionary variables = null; *************** *** 1845,1849 **** context = contextProperty == null ? null ! : ResolveValueIfNecessary(name, definition, "Context", contextProperty.Value); PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables"); --- 1876,1880 ---- context = contextProperty == null ? null ! : ResolveValueIfNecessary(name, definition, "Context", contextProperty.Value); PropertyValue variablesProperty = expHolder.Properties.GetPropertyValue("Variables"); *************** *** 1854,1858 **** if (vars is IDictionary) { ! variables = (IDictionary) vars; } else --- 1885,1889 ---- if (vars is IDictionary) { ! variables = (IDictionary)vars; } else *************** *** 1864,1868 **** if (variables == null) variables = CollectionsUtil.CreateCaseInsensitiveHashtable(); // add 'this' objectfactory reference to variables ! variables.Add( Expression.ReservedVariableNames.CurrentObjectFactory, this ); resolvedValue = expHolder.Expression.GetValue(context, variables); --- 1895,1899 ---- if (variables == null) variables = CollectionsUtil.CreateCaseInsensitiveHashtable(); // add 'this' objectfactory reference to variables ! variables.Add(Expression.ReservedVariableNames.CurrentObjectFactory, this); resolvedValue = expHolder.Expression.GetValue(context, variables); *************** *** 1871,1880 **** { resolvedValue = ! ((IManagedCollection) argumentValue).Resolve(name, definition, argumentName, new ManagedCollectionElementResolver(ResolveValueIfNecessary)); } else if (argumentValue is TypedStringValue) { ! TypedStringValue tsv = (TypedStringValue) argumentValue; try { --- 1902,1911 ---- { resolvedValue = ! ((IManagedCollection)argumentValue).Resolve(name, definition, argumentName, new ManagedCollectionElementResolver(ResolveValueIfNecessary)); } else if (argumentValue is TypedStringValue) { ! TypedStringValue tsv = (TypedStringValue)argumentValue; try { *************** *** 1888,1897 **** resolvedValue = tsv.Value; } ! } catch (Exception ex) { throw new ObjectCreationException(definition.ResourceDescription, name, "Error converted typed String value for " + argumentName, ex); } ! } else --- 1919,1929 ---- resolvedValue = tsv.Value; } ! } ! catch (Exception ex) { throw new ObjectCreationException(definition.ResourceDescription, name, "Error converted typed String value for " + argumentName, ex); } ! } else *************** *** 2072,2076 **** { return ConfigureObject(name, definition, new ObjectWrapper(target)); ! } return null; --- 2104,2108 ---- { return ConfigureObject(name, definition, new ObjectWrapper(target)); ! } return null; *************** *** 2114,2118 **** protected virtual object ConfigureObject(string name, RootObjectDefinition definition, IObjectWrapper wrapper) { ! object instance = wrapper.WrappedInstance; #region Instrumentation --- 2146,2150 ---- protected virtual object ConfigureObject(string name, RootObjectDefinition definition, IObjectWrapper wrapper) { ! object instance = wrapper.WrappedInstance; #region Instrumentation *************** *** 2139,2143 **** #endregion ! ((IObjectNameAware) instance).ObjectName = name; } --- 2171,2175 ---- #endregion ! ((IObjectNameAware)instance).ObjectName = name; } *************** *** 2155,2159 **** #endregion ! ((IObjectFactoryAware) instance).ObjectFactory = this; } --- 2187,2191 ---- #endregion ! ((IObjectFactoryAware)instance).ObjectFactory = this; } *************** *** 2280,2285 **** #endregion ! ! object result = instance; foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors) { --- 2312,2317 ---- #endregion ! ! object result = instance; foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors) { *************** *** 2287,2291 **** if (result == null) { ! throw new ObjectCreationException(name, string.Format(CultureInfo.InvariantCulture, "PostProcessBeforeInitialization method of IObjectPostProcessor [{0}] " --- 2319,2323 ---- if (result == null) { ! throw new ObjectCreationException(name, string.Format(CultureInfo.InvariantCulture, "PostProcessBeforeInitialization method of IObjectPostProcessor [{0}] " *************** *** 2326,2330 **** #endregion ! object result = instance; foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors) { --- 2358,2362 ---- #endregion ! object result = instance; foreach (IObjectPostProcessor objectProcessor in ObjectPostProcessors) { *************** *** 2332,2336 **** if (result == null) { ! throw new ObjectCreationException(name, string.Format(CultureInfo.InvariantCulture, "PostProcessAfterInitialization method of IObjectPostProcessor [{0}] " --- 2364,2368 ---- if (result == null) { ! throw new ObjectCreationException(name, string.Format(CultureInfo.InvariantCulture, "PostProcessAfterInitialization method of IObjectPostProcessor [{0}] " Index: AbstractObjectFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** AbstractObjectFactory.cs 5 Apr 2008 13:35:35 -0000 1.76 --- AbstractObjectFactory.cs 29 May 2008 12:13:27 -0000 1.77 *************** *** 279,286 **** { // create object instance... ! lock (singletonCache) ! { ! sharedInstance = CreateAndCacheSingletonInstance(objectName, mergedObjectDefinition, arguments); ! } instance = GetObjectForInstance(name, sharedInstance); } --- 279,283 ---- { // create object instance... ! sharedInstance = CreateAndCacheSingletonInstance(objectName, mergedObjectDefinition, arguments); instance = GetObjectForInstance(name, sharedInstance); } |