springnet-commits Mailing List for Spring Framework .NET (Page 19)
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: Mark P. <mar...@us...> - 2008-01-29 18:50:37
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19609 Modified Files: Spring.Data.Tests.2005.csproj Log Message: misc cleanup 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.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Spring.Data.Tests.2005.csproj 13 Dec 2007 21:18:34 -0000 1.33 --- Spring.Data.Tests.2005.csproj 29 Jan 2008 18:50:33 -0000 1.34 *************** *** 164,169 **** </ItemGroup> <ItemGroup> - <EmbeddedResource Include="Data\Common\AdditonalProviders.xml" /> <EmbeddedResource Include="Data\AutoDeclarativeTxTests.xml" /> <Content Include="Spring.Data.Tests.dll.config" /> <EmbeddedResource Include="Transaction\Interceptor\MatchAlwaysTransactionAttributeSourceTests.xml" /> --- 164,169 ---- </ItemGroup> <ItemGroup> <EmbeddedResource Include="Data\AutoDeclarativeTxTests.xml" /> + <EmbeddedResource Include="Data\Common\AdditionalProviders.xml" /> <Content Include="Spring.Data.Tests.dll.config" /> <EmbeddedResource Include="Transaction\Interceptor\MatchAlwaysTransactionAttributeSourceTests.xml" /> *************** *** 172,175 **** --- 172,176 ---- <ItemGroup> <Compile Include="Data\Common\DbParametersTests.cs" /> + <Compile Include="Data\Common\UserCredentialsDbProviderTests.cs" /> <Compile Include="Data\Core\ServiceDomainTransactionManagerTests.cs" /> <Compile Include="Data\Core\TxScopeTransactionManagerIntegrationTests.cs" /> |
From: Mark P. <mar...@us...> - 2008-01-29 18:29:39
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Testing.NUnit/Testing/NUnit In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv11204 Modified Files: AbstractDependencyInjectionSpringContextTests.cs Log Message: Index: AbstractDependencyInjectionSpringContextTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractDependencyInjectionSpringContextTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractDependencyInjectionSpringContextTests.cs 1 Jun 2007 14:05:57 -0000 1.2 --- AbstractDependencyInjectionSpringContextTests.cs 29 Jan 2008 18:29:33 -0000 1.3 *************** *** 165,169 **** /// </summary> [SetUp] ! protected void SetUp() { this.applicationContext = GetContext(ContextKey); --- 165,169 ---- /// </summary> [SetUp] ! protected virtual void SetUp() { this.applicationContext = GetContext(ContextKey); *************** *** 296,299 **** --- 296,300 ---- if (field != null) { + BeforeProtectedVariableInjection(field); obj = this.applicationContext.GetObject(fieldName, field.FieldType); field.SetValue(this, obj); *************** *** 321,324 **** --- 322,330 ---- } + protected virtual void BeforeProtectedVariableInjection(FieldInfo fieldInfo) + { + + } + /// <summary> /// Subclasses can override this method in order to |
From: Mark P. <mar...@us...> - 2008-01-29 18:27:42
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10398 Modified Files: RetryAdvice.cs Log Message: add trace level logging to retry advice when retrying method invocation. Index: RetryAdvice.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RetryAdvice.cs 10 Oct 2007 17:10:51 -0000 1.3 --- RetryAdvice.cs 29 Jan 2008 18:27:37 -0000 1.4 *************** *** 128,149 **** int numAttempts = 0; - /* - Exception failureException; - do - { - numAttempts++; - try - { - return invocation.Proceed(); - } - catch (Exception ex) - { - failureException = ex; - } - } while (numAttempts <= this.maxRetries); - throw failureException; - */ - - object returnVal = null; do --- 128,131 ---- *************** *** 166,169 **** --- 148,155 ---- else { + if (log.IsTraceEnabled) + { + log.Trace("Retrying " + invocation.Method.Name); + } callContextDictionary["n"] = numAttempts; Sleep(retryExceptionHandler, callContextDictionary); *************** *** 178,182 **** } ! private void Sleep(RetryExceptionHandler handler, IDictionary callContextDictionary) { if (handler.IsDelayBased) --- 164,168 ---- } ! private static void Sleep(RetryExceptionHandler handler, IDictionary callContextDictionary) { if (handler.IsDelayBased) |
From: Mark P. <mar...@us...> - 2008-01-29 18:25:01
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9245 Modified Files: Spring.Core.2002.csproj Log Message: misc cleanup Index: Spring.Core.2002.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Spring.Core.2002.csproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Spring.Core.2002.csproj 14 Sep 2007 15:18:40 -0000 1.13 --- Spring.Core.2002.csproj 29 Jan 2008 18:24:58 -0000 1.14 *************** *** 121,129 **** /> <File - RelPath = "Caching\CachePriority.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "Caching\CacheResultAttribute.cs" SubType = "Code" --- 121,124 ---- |
From: Mark P. <mar...@us...> - 2008-01-29 18:24:53
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9228 Modified Files: Spring.Aop.2002.csproj Log Message: misc cleanup Index: Spring.Aop.2002.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Spring.Aop.2002.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Spring.Aop.2002.csproj 14 Sep 2007 15:18:40 -0000 1.9 --- Spring.Aop.2002.csproj 29 Jan 2008 18:24:50 -0000 1.10 *************** *** 680,683 **** --- 680,713 ---- /> <File + RelPath = "Aspects\AbstractExceptionHandler.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Aspects\AbstractExceptionHandlerAdvice.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Aspects\IExceptionHandler.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Aspects\ParsedAdviceExpression.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Aspects\RetryAdvice.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Aspects\RetryExceptionHandler.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Aspects\Cache\BaseCacheAdvice.cs" SubType = "Code" *************** *** 720,754 **** /> <File ! RelPath = "Aspects\Exceptions\AbstractExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\ExceptionHandlerAdvice.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\IExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\LogExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\ReturnValueExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\SwallowExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\TranslationExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" --- 750,784 ---- /> <File ! RelPath = "Aspects\Exceptions\ExceptionHandlerAdvice.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\LogExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\ReturnValueExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\SwallowExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Exceptions\TranslationExceptionHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Logging\AbstractLoggingAdvice.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Aspects\Logging\SimpleLoggingAdvice.cs" SubType = "Code" BuildAction = "Compile" |
From: Mark P. <mar...@us...> - 2008-01-29 18:24:53
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9228/Aop/Framework/DynamicProxy Modified Files: TargetAopProxyMethodBuilder.cs Log Message: misc cleanup Index: TargetAopProxyMethodBuilder.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TargetAopProxyMethodBuilder.cs 14 Sep 2006 21:05:23 -0000 1.2 --- TargetAopProxyMethodBuilder.cs 29 Jan 2008 18:24:50 -0000 1.3 *************** *** 65,69 **** /// </param> /// <param name="targetMethods"> ! /// /// </param> public TargetAopProxyMethodBuilder(TypeBuilder typeBuilder, --- 65,70 ---- /// </param> /// <param name="targetMethods"> ! /// The dictionary to cache the list of target ! /// <see cref="System.Reflection.MethodInfo"/>s. /// </param> public TargetAopProxyMethodBuilder(TypeBuilder typeBuilder, |
From: Mark P. <mar...@us...> - 2008-01-29 18:22:40
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8407 Modified Files: AccountManager.cs AdoTemplateTests.cs CreateTestObjectNonQuery.cs NativeAdoTestObjectDao.cs NativeAdoTests.cs StoredProcedureTests.cs TestObjectStoredProcedure.cs adoTemplateTests.xml autoDeclarativeServices.xml nativeAdoTests.xml templateTests.xml Log Message: sync up misc integration testing work. Index: TestObjectStoredProcedure.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/TestObjectStoredProcedure.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestObjectStoredProcedure.cs 25 Jul 2007 08:25:26 -0000 1.2 --- TestObjectStoredProcedure.cs 29 Jan 2008 18:22:33 -0000 1.3 *************** *** 50,54 **** --- 50,62 ---- //the 100 is for the out parameter that is incorrectly classified as input-output return Query(name); + + } + + public IDictionary GetResultsUsingInDictionary(IDictionary inParams) + { + return ExecuteNonQueryByNamedParam(inParams); } + + } Index: AccountManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/AccountManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AccountManager.cs 7 Dec 2006 05:00:36 -0000 1.2 --- AccountManager.cs 29 Jan 2008 18:22:33 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- using System; + using System.Data; using Spring.Transaction.Interceptor; *************** *** 26,34 **** } ! [Transaction()] public void DoTransfer(float creditAmount, float debitAmount) { creditDao.CreateCredit(creditAmount); debitDao.DebitAccount(debitAmount); } --- 27,36 ---- } ! [Transaction] public void DoTransfer(float creditAmount, float debitAmount) { creditDao.CreateCredit(creditAmount); debitDao.DebitAccount(debitAmount); + } Index: templateTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/templateTests.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** templateTests.xml 17 Sep 2007 19:18:50 -0000 1.4 --- templateTests.xml 29 Jan 2008 18:22:33 -0000 1.5 *************** *** 4,10 **** <d:provider id="DbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> <object id="Parent" --- 4,26 ---- <d:provider id="DbProvider" ! provider="System.Data.SqlClient" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/> ! ! <object name="LoggingAdvice" type="Spring.Aspects.Logging.SimpleLoggingAdvice, Spring.Aop"> ! <property name="logUniqueIdentifier" value="true"/> ! <property name="logExecutionTime" value="true"/> ! <property name="logMethodArguments" value="true"/> ! ! <property name="Separator" value=";"/> ! <property name="LogLevel" value="Info"/> ! ! <property name="HideProxyTypeNames" value="true"/> ! <property name="UseDynamicLogger" value="true"/> ! </object> + <object id="SetterAndMethodLoggingAdvisor" type="Spring.Aop.Support.RegularExpressionMethodPointcutAdvisor, Spring.Aop"> + <property name="advice" ref="LoggingAdvice" /> + <property name="pattern" value=".*" /> + </object> <object id="Parent" *************** *** 37,42 **** <object name="autoProxyCreator" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop"> ! <property name="InterceptorNames" value="transactionInterceptor"/> <property name="ObjectNames"> <list> --- 53,66 ---- <object name="autoProxyCreator" type="Spring.Aop.Framework.AutoProxy.ObjectNameAutoProxyCreator, Spring.Aop"> ! ! <property name="InterceptorNames"> ! <list> ! <value>SetterAndMethodLoggingAdvisor</value> ! <value>transactionInterceptor</value> ! </list> ! </property> ! <!-- <property name="InterceptorNames" value="transactionInterceptor"/> + --> <property name="ObjectNames"> <list> Index: AdoTemplateTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/AdoTemplateTests.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AdoTemplateTests.cs 3 Aug 2007 19:51:22 -0000 1.10 --- AdoTemplateTests.cs 29 Jan 2008 18:22:33 -0000 1.11 *************** *** 84,88 **** dbProvider = ctx["DbProvider"] as IDbProvider; Assert.IsNotNull(dbProvider); ! adoOperations = new AdoTemplate(dbProvider); } --- 84,94 ---- dbProvider = ctx["DbProvider"] as IDbProvider; Assert.IsNotNull(dbProvider); ! UserCredentialsDbProvider userCredentialsDbProvider = dbProvider as UserCredentialsDbProvider; ! Assert.IsNotNull(userCredentialsDbProvider); ! ! //userCredentialsDbProvider.Username = "User ID=springqa"; ! //userCredentialsDbProvider.Password = "Password=springqa"; ! userCredentialsDbProvider.SetCredentialsForCurrentThread("User ID=springqa", "Password=springqa"); ! adoOperations = new AdoTemplate(userCredentialsDbProvider); } Index: adoTemplateTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/adoTemplateTests.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** adoTemplateTests.xml 30 Aug 2007 20:00:07 -0000 1.6 --- adoTemplateTests.xml 29 Jan 2008 18:22:33 -0000 1.7 *************** *** 3,11 **** xmlns:d="http://www.springframework.net/database"> <d:provider id="DbProvider" provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! ! <!-- <object id="DbProvider" type="Spring.Data.Common.DbProviderFactoryObject, Spring.Data"> <property name="ProviderName" value="SqlServer-1.1"/> --- 3,20 ---- xmlns:d="http://www.springframework.net/database"> + <!-- ;User ID=springqa;Password=springqa; --> + + <d:provider id="DbProvider" provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa"/> ! <!-- Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa --> ! <!-- ! ! <d:provider id="DbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! --> ! <!-- <object id="DbProvider" type="Spring.Data.Common.DbProviderFactoryObject, Spring.Data"> <property name="ProviderName" value="SqlServer-1.1"/> *************** *** 15,18 **** --- 24,28 ---- </object> --> + <object id="adoTemplate" Index: nativeAdoTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/nativeAdoTests.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nativeAdoTests.xml 18 May 2006 21:37:53 -0000 1.1 --- nativeAdoTests.xml 29 Jan 2008 18:22:33 -0000 1.2 *************** *** 5,9 **** <object id="testObjectDao" type="Spring.Data.NativeAdoTestObjectDao, Spring.Data.Integration.Tests"> ! <property name="ConnectionString" value="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> </object> --- 5,9 ---- <object id="testObjectDao" type="Spring.Data.NativeAdoTestObjectDao, Spring.Data.Integration.Tests"> ! <property name="ConnectionString" value="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> </object> Index: autoDeclarativeServices.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/autoDeclarativeServices.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** autoDeclarativeServices.xml 17 Sep 2007 19:18:50 -0000 1.6 --- autoDeclarativeServices.xml 29 Jan 2008 18:22:33 -0000 1.7 *************** *** 3,16 **** xmlns:d="http://www.springframework.net/database"> ! <d:provider id="DbProvider" provider="SqlServer-2.0" connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa"/> ! ! <!-- <d:provider id="DbProvider" provider="SqlServer-1.1" ! connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! --> <object id="adoTransactionManager" type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data"> --- 3,15 ---- xmlns:d="http://www.springframework.net/database"> ! <!-- <d:provider id="DbProvider" provider="SqlServer-2.0" connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;Persist Security Info=True;User ID=springqa;Password=springqa"/> ! --> ! <d:provider id="DbProvider" provider="SqlServer-1.1" ! connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> <object id="adoTransactionManager" type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data"> Index: NativeAdoTestObjectDao.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/NativeAdoTestObjectDao.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NativeAdoTestObjectDao.cs 16 Aug 2006 08:15:23 -0000 1.4 --- NativeAdoTestObjectDao.cs 29 Jan 2008 18:22:33 -0000 1.5 *************** *** 1,6 **** - #region Imports using System; using System.Data.SqlClient; using System.Text; --- 1,7 ---- #region Imports using System; + using System.Collections; + using System.Data; using System.Data.SqlClient; using System.Text; *************** *** 11,45 **** namespace Spring.Data { ! public class NativeAdoTestObjectDao : ITestObjectDao { private String connectionString; - - public string ConnectionString - { - get { return connectionString; } - set { connectionString = value; } - } ! public void Create2(string name, int age) ! { using (SqlConnection connection = new SqlConnection(connectionString)) { ! String sql = String.Format("insert into TestObjects(Age, Name) " + ! "VALUES ({0}, '{1}')", age, name); ! using (SqlCommand cmd = new SqlCommand(sql, connection)) { connection.Open(); ! cmd.ExecuteNonQuery(); } } ! ! } ! public void Create(string name, int age) { using (SqlConnection connection = new SqlConnection(connectionString)) { /* string strSql = "insert into TestObjects(Age,Name) values (@Age,@Name)"; --- 12,119 ---- namespace Spring.Data { ! public class NativeAdoTestObjectDao : ITestObjectDao { private String connectionString; ! public string ConnectionString ! { ! get { return connectionString; } ! set { connectionString = value; } ! } ! ! ! public IList ExplicitTx() ! { ! try ! { ! using (SqlConnection connection = new SqlConnection(connectionString)) ! { ! connection.Open(); ! ! using (SqlTransaction transaction = connection.BeginTransaction()) ! { ! using (SqlCommand command = new SqlCommand("sql")) ! { ! command.Connection = connection; ! command.Transaction = transaction; ! ! /* ! * dbParameters.Add("savings", DbType.Decimal).Value = b.Savings.AsDecimal(); ! dbParameters.Add("accountId", DbType.Int).Value = account.EntityId; ! dbParameters.Add("name", DbType.String).Value = b.Name; ! */ ! command.Parameters.Add("@savings", SqlDbType.Decimal).Value = 1;// = b.Savings.AsDecimal(); ! command.Parameters.Add("@accountId", SqlDbType.Int).Value = 2; ! command.Parameters.Add("@name", SqlDbType.NVarChar, 40).Value = 3; ! command.ExecuteNonQuery(); ! //foreach (Benificiary b in Account.Beneficiaries) ! //{ ! ! //} ! ! transaction.Commit(); ! } ! } ! } ! } catch (Exception) ! { ! //log exception and rethrow ! } ! return null; ! } ! ! public IList FindAllPeople() ! { ! IList results = new ArrayList(); ! try ! { ! using (SqlConnection connection = new SqlConnection(connectionString)) ! { ! string sql = "select Name, Age from ..."; ! ! using (SqlCommand command = new SqlCommand(sql, connection)) ! { ! connection.Open(); ! using (SqlDataReader reader = command.ExecuteReader()) ! { ! while (reader.Read()) ! { ! //process the result set - populate Person object, add to array ! } ! } ! } ! } ! } ! catch (Exception) ! { ! //throw application exception ! } ! return results; ! } ! ! public void Create2(string name, int age) ! { using (SqlConnection connection = new SqlConnection(connectionString)) { ! String sql = String.Format("insert into TestObjects(Age, Name) " + ! "VALUES ({0}, '{1}')", age, name); ! using (SqlCommand cmd = new SqlCommand(sql, connection)) { connection.Open(); ! cmd.ExecuteNonQuery(); } } ! } ! ! public void Create(string name, int age) { using (SqlConnection connection = new SqlConnection(connectionString)) { + SqlParameter p1 = new SqlParameter("name", SqlDbType.NVarChar); + p1.Value = "asdf"; + /* string strSql = "insert into TestObjects(Age,Name) values (@Age,@Name)"; *************** *** 60,75 **** */ ! ! StringBuilder sb = new StringBuilder(); sb.AppendFormat( ! "insert into TestObjects(Age, Name) VALUES ({0}, '{1}')", age, name); ! SqlCommand comm = connection.CreateCommand(); comm.CommandText = sb.ToString(); ! ! connection.Open(); ! comm.ExecuteNonQuery(); } } --- 134,149 ---- */ ! ! StringBuilder sb = new StringBuilder(); sb.AppendFormat( ! "insert into TestObjects(Age, Name) VALUES ({0}, '{1}')", age, name); ! SqlCommand comm = connection.CreateCommand(); comm.CommandText = sb.ToString(); ! ! connection.Open(); ! comm.ExecuteNonQuery(); } } *************** *** 109,131 **** } ! public int GetCount(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } ! public int GetCount(int lowerAgeLimit, string name) ! { ! throw new NotImplementedException(); ! } ! public int GetCountByAltMethod(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } ! public int GetCountByCommandSetter(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } } ! } --- 183,205 ---- } ! public int GetCount(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } ! public int GetCount(int lowerAgeLimit, string name) ! { ! throw new NotImplementedException(); ! } ! public int GetCountByAltMethod(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } ! public int GetCountByCommandSetter(int lowerAgeLimit) ! { ! throw new NotImplementedException(); ! } } ! } \ No newline at end of file Index: CreateTestObjectNonQuery.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/CreateTestObjectNonQuery.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CreateTestObjectNonQuery.cs 21 Jun 2006 14:07:30 -0000 1.1 --- CreateTestObjectNonQuery.cs 29 Jan 2008 18:22:33 -0000 1.2 *************** *** 32,36 **** { /// <summary> ! /// Simple stored procedure with only 'in' args to create a testobject record /// </summary> /// <author>Mark Pollack (.NET)</author> --- 32,36 ---- { /// <summary> ! /// Simple insert non query object with 'in' args to create a testobject. /// </summary> /// <author>Mark Pollack (.NET)</author> Index: StoredProcedureTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/StoredProcedureTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StoredProcedureTests.cs 11 Oct 2007 06:03:26 -0000 1.4 --- StoredProcedureTests.cs 29 Jan 2008 18:22:33 -0000 1.5 *************** *** 87,90 **** --- 87,101 ---- ", " + entry.Value); } + + IDictionary inParams = new Hashtable(); + inParams.Add("@Name", "George"); + results = sproc.GetResultsUsingInDictionary(inParams); + Console.WriteLine("\n\n\n"); + foreach (DictionaryEntry entry in results) + { + Console.WriteLine(entry.Key + + ", " + entry.Value); + } + } Index: NativeAdoTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/NativeAdoTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NativeAdoTests.cs 5 Jun 2006 07:26:37 -0000 1.2 --- NativeAdoTests.cs 29 Jan 2008 18:22:33 -0000 1.3 *************** *** 22,25 **** --- 22,27 ---- using System; + using System.Data; + using System.Data.SqlClient; using NUnit.Framework; using Spring.Context; *************** *** 43,46 **** --- 45,64 ---- dao.Create("John", 45); } + + [Test] + public void Helloworld() + { + string connString = + @"Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"; + + SqlConnection conn = new SqlConnection(connString); + conn.Open(); + //conn.BeginTransaction(IsolationLevel.Unspecified); + SqlTransaction trans = conn.BeginTransaction(); + Console.WriteLine(trans.IsolationLevel); + + + + } } } |
From: Mark P. <mar...@us...> - 2008-01-29 18:22:40
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/Generic In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8407/Generic Modified Files: GenericAdoTemplateTests.xml TestObjectDao.cs Log Message: sync up misc integration testing work. Index: TestObjectDao.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/Generic/TestObjectDao.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestObjectDao.cs 25 Jul 2007 18:43:24 -0000 1.2 --- TestObjectDao.cs 29 Jan 2008 18:22:33 -0000 1.3 *************** *** 44,47 **** --- 44,54 ---- new TestObjectRowMapper<TestObject>()); } + + public TestObject FindOne() + { + return AdoTemplate.QueryForObject(CommandType.Text, + "", + new TestObjectRowMapper<TestObject>()); + } } } Index: GenericAdoTemplateTests.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Integration.Tests/Data/Generic/GenericAdoTemplateTests.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GenericAdoTemplateTests.xml 7 Aug 2007 19:50:44 -0000 1.3 --- GenericAdoTemplateTests.xml 29 Jan 2008 18:22:33 -0000 1.4 *************** *** 1,15 **** <?xml version="1.0" encoding="utf-8" ?> <objects xmlns="http://www.springframework.net" ! xmlns:d="http://www.springframework.net/database"> ! ! <d:provider id="DbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! ! <object id="adoTemplate" ! type="Spring.Data.Generic.AdoTemplate, Spring.Data"> ! <property name="DbProvider" ref="DbProvider"/> </object> --- 1,17 ---- <?xml version="1.0" encoding="utf-8" ?> <objects xmlns="http://www.springframework.net" ! xmlns:db="http://www.springframework.net/database"> ! <db:provider id="dbProvider" ! provider="SqlServer-1.1" ! connectionString="Data Source=MARKT60\SQL2005;Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/> ! <object id="transactionManager" type="Spring.Data.Core.AdoPlatformTransactionManager, Spring.Data"> ! <property name="DbProvider" ref="dbProvider"/> ! </object> ! ! <object id="adoTemplate" type="Spring.Data.Generic.AdoTemplate, Spring.Data"> ! <property name="DbProvider" ref="dbProvider"/> ! <property name="DataReaderWrapperType" value="Spring.Data.Support.NullMappingDataReader, Spring.Data"/> </object> |
From: Mark P. <mar...@us...> - 2008-01-29 18:18:48
|
Update of /cvsroot/springnet/Spring.Net/doc/reference/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6758 Modified Files: dbprovider.xml Log Message: SPRNET-858 - Added IDbProvider implementation, UserCredentialsDbProvider, to allow changing of username, password connection strings at runtime Index: dbprovider.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/doc/reference/src/dbprovider.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dbprovider.xml 24 Jan 2008 17:32:36 -0000 1.17 --- dbprovider.xml 29 Jan 2008 18:18:44 -0000 1.18 *************** *** 372,398 **** </section> ! <section> ! <title>MultiDelegatingDbProvider</title> ! <para>There are use-cases in which there will need to be a runtime ! selection of the database to connect to among many possible candidates. ! This is often the case where the same schema is installed in separate ! databases for different clients. The ! <classname>MultiDelegatingDbProvider</classname> implements the ! <classname>IDbProvider</classname> interface and provides an abstraction ! to the multiple databases and can be used in DAO layer such that the DAO ! layer is unaware of the switching between databases. ! <classname>MultiDelegatingDbProvider</classname> does its job by looking ! into thread local storage under the key dbProviderName. This storage ! location stores the name of the dbProvider that is to be used for ! processing the request. <classname>MultiDelegatingDbProvider</classname> ! is configured using the dictionary property ! <literal>TargetDbProviders</literal>. The key of this dictionary contains ! the name of a dbProvider and its value is a dbProvider object. During ! request processing, once you have determined which target dbProvider ! should be use, in this example database1ProviderName, you should execute ! the following code <literal>LogicalThreadContext.SetData("dbProviderName", ! "database1ProviderName")</literal> and then call the data access ! layer.</para> </section> </chapter> \ No newline at end of file --- 372,454 ---- </section> ! <section id="dbprovider-additional"> ! <title>Additional IDbProvider implementations</title> ! <para>Spring provides some convenient implementations of the IDbProvider ! interface that add addtional behavior on top of the standard ! implementation. </para> ! ! <section id="dbprovider-usercredentials"> ! <title>UserCredentialsDbProvider</title> ! ! <para>This <classname>UserCredentialsDbProvider</classname> will allow ! you to change the username and password of a database connection at ! runtime. The API contains the properties <literal>Username</literal> and ! <literal>Password</literal> which are used as the default strings ! representing the user and password in the connection string. You can ! then change the value of these properties in the connection string by ! calling the method <literal>SetCredentialsForCurrentThread</literal> and ! fall back to the default values by calling the method ! <literal>RemoveCredentialsFromCurrentThread</literal>. You call the ! <literal>SetCredentialsForCurrentThread</literal> method at runtime, ! before any data access occurs, to determine which database user should ! be used for the current user-case. Which user to select is up to you. ! You may retrieve the user information from an HTTP session for example. ! Example configuration and usage is shown below</para> ! ! <programlisting><object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data"> ! <property name="TargetDbProvider" ref="targetDbProvider"/> ! <property name="Username" value="User ID=defaultName"/> ! <property name="Password" value="Password=defaultPass"/> ! </object> ! ! <db:provider id="targetDbProvider" provider="SqlServer-2.0" ! connectionString="Data Source=MARKT60\SQL2005;Database=Spring;Trusted_Connection=False"/></programlisting> ! ! <para>If you use dependency injection to configure a class with a ! property of the type <literal>IDbProvider</literal>, you will need to ! downcast to the subtype or you can change your class to have a property ! of the type <literal>UserCredentialsDbProvider</literal> instead of ! <literal>IDbProvider</literal>.</para> ! ! <programlisting>userCredentialsDbProvider.SetCredentialsForCurrentThread("User ID=springqa", "Password=springqa");</programlisting> ! ! <para><literal>UserCredentialsDbProvider's</literal> has a base class, ! <literal>DelegatingDbProvider</literal>, and is intended for you to use ! in your own implementations that delegate calls to a target ! <literal>IDbProvider</literal> instance. This class in meant to be ! subclassed with subclasses overriding only those methods, such as ! <literal>CreateConnection()</literal>, that should not simply delegate ! to the target <literal>IDbProvider</literal>.</para> ! </section> ! ! <section id="dbprovider-multidelegating"> ! <title>MultiDelegatingDbProvider</title> ! ! <para>There are use-cases in which there will need to be a runtime ! selection of the database to connect to among many possible candidates. ! This is often the case where the same schema is installed in separate ! databases for different clients. The ! <classname>MultiDelegatingDbProvider</classname> implements the ! <classname>IDbProvider</classname> interface and provides an abstraction ! to the multiple databases and can be used in DAO layer such that the DAO ! layer is unaware of the switching between databases. ! <classname>MultiDelegatingDbProvider</classname> does its job by looking ! into thread local storage under the key dbProviderName. This storage ! location stores the name of the dbProvider that is to be used for ! processing the request. <classname>MultiDelegatingDbProvider</classname> ! is configured using the dictionary property ! <literal>TargetDbProviders</literal>. The key of this dictionary ! contains the name of a dbProvider and its value is a dbProvider object. ! (You can also provide this dictionary as a constructor argument.) During ! request processing, once you have determined which target dbProvider ! should be use, in this example database1ProviderName, you should execute ! the following code ! <literal>LogicalThreadContext.SetData("dbProviderName", ! "database1ProviderName")</literal> and then call the data access ! layer.</para> ! ! <para></para> ! </section> </section> </chapter> \ No newline at end of file |
From: Mark P. <mar...@us...> - 2008-01-29 18:18:22
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6734 Modified Files: DbProviderFactoryTests.cs Added Files: AdditionalProviders.xml Log Message: Tests for SPRNET-829 - Named constructor argument metadata should be stored/compared using consistent CultureInfo --- NEW FILE: AdditionalProviders.xml --- (This appears to be a binary file; contents omitted.) Index: DbProviderFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DbProviderFactoryTests.cs 6 Dec 2007 20:14:34 -0000 1.10 --- DbProviderFactoryTests.cs 29 Jan 2008 18:18:17 -0000 1.11 *************** *** 20,26 **** --- 20,30 ---- using System; + using System.Globalization; using System.Reflection; + using System.Threading; using NUnit.Framework; using Spring.Context; + using Spring.Core.IO; + using Spring.Threading; using Spring.Util; *************** *** 35,48 **** public class DbProviderFactoryTests { [SetUp] public void Setup() { ! //BasicConfigurator.Configure(); } - #if NET_2_0 [Test] public void DefaultInstanceWithSqlServer2005() { IDbProvider provider = DbProviderFactory.GetDbProvider("SqlServer-2.0"); AssertIsSqlServer2005(provider); --- 39,103 ---- public class DbProviderFactoryTests { + #region Helper classes for threading tests + + public class AsyncTestDbProviderFactory : AsyncTestTask + { + private string providerName; + + public AsyncTestDbProviderFactory(int iterations, string providerName) + : base(iterations) + { + this.providerName = providerName; + } + + public override void DoExecute() + { + object result = DbProviderFactory.GetDbProvider(providerName); + } + } + + #endregion + + private static string altConfig = "assembly://Spring.Data.Tests/Spring.Data.Common/AdditonalProviders.xml"; + + [SetUp] public void Setup() { ! DbProviderFactory.DBPROVIDER_ADDITIONAL_RESOURCE_NAME = altConfig; ! } ! ! #if NET_2_0 ! ! [Test] ! public void ThreadSafety() ! { ! AsyncTestTask t1 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); ! AsyncTestTask t2 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); ! AsyncTestTask t3 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); ! AsyncTestTask t4 = new AsyncTestDbProviderFactory(1000, "SqlServer-2.0").Start(); ! ! t1.AssertNoException(); ! t2.AssertNoException(); ! t3.AssertNoException(); ! t4.AssertNoException(); ! ! } ! ! [Test] ! [Ignore("Can't guarantee test order")] ! public void AdditionalResourceName() ! { ! ! IDbProvider provider = DbProviderFactory.GetDbProvider("Test-SqlServer-2.0"); ! Assert.IsNotNull(provider); } [Test] public void DefaultInstanceWithSqlServer2005() { + Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); + IApplicationContext ctx = DbProviderFactory.ApplicationContext; + Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR", false); IDbProvider provider = DbProviderFactory.GetDbProvider("SqlServer-2.0"); AssertIsSqlServer2005(provider); |
From: Mark P. <mar...@us...> - 2008-01-29 18:17:53
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6361 Added Files: UserCredentialsDbProviderTests.cs Log Message: SPRNET-858 - Added IDbProvider implementation, UserCredentialsDbProvider, to allow changing of username, password connection strings at runtime. --- NEW FILE: UserCredentialsDbProviderTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Mark P. <mar...@us...> - 2008-01-29 18:15:41
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5594 Modified Files: DbProvider.cs MultiDelegatingDbProvider.cs Log Message: SPRNET-859 Add addtional constructor to MultiDelegatingDbProvider that takes dictionary of target name/providers. Index: MultiDelegatingDbProvider.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MultiDelegatingDbProvider.cs 7 Dec 2007 08:09:52 -0000 1.3 --- MultiDelegatingDbProvider.cs 29 Jan 2008 18:15:38 -0000 1.4 *************** *** 46,49 **** --- 46,50 ---- private IDictionary targetDbProviders = new SynchronizedHashtable(); + #region Constructors /// <summary> /// Initializes a new instance of the <see cref="MultiDelegatingDbProvider"/> class. *************** *** 53,56 **** --- 54,69 ---- } + + /// <summary> + /// Initializes a new instance of the <see cref="MultiDelegatingDbProvider"/> class. + /// </summary> + /// <param name="targetDbProviders">The target db providers.</param> + public MultiDelegatingDbProvider(IDictionary targetDbProviders) + { + this.targetDbProviders = targetDbProviders; + } + + #endregion + /// <summary> /// Sets the target db providers. Index: DbProvider.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/DbProvider.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DbProvider.cs 28 Dec 2007 19:37:13 -0000 1.15 --- DbProvider.cs 29 Jan 2008 18:15:38 -0000 1.16 *************** *** 30,33 **** --- 30,34 ---- /// Implemenation of of DbProvider that uses metadata to create provider specific ADO.NET objects. /// </summary> + /// <version>$Id:</version> public class DbProvider : IDbProvider { |
From: Mark P. <mar...@us...> - 2008-01-29 18:14:18
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5166 Modified Files: Spring.Data.2005.csproj Log Message: SPRNET-858 - Added IDbProvider implementation, UserCredentialsDbProvider, to allow changing of username, password connection strings at runtime Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Spring.Data.2005.csproj 14 Jan 2008 20:49:47 -0000 1.62 --- Spring.Data.2005.csproj 29 Jan 2008 18:14:14 -0000 1.63 *************** *** 130,133 **** --- 130,134 ---- <Compile Include="Data\Common\DbProviderFactoryObject.cs" /> <Compile Include="Data\Common\DbParametersBuilder.cs" /> + <Compile Include="Data\Common\DelegatingDbProvider.cs" /> <Compile Include="Data\Common\ErrorCodes.cs" /> <Compile Include="Data\Common\IDbMetadata.cs" /> *************** *** 139,142 **** --- 140,144 ---- <Compile Include="Data\CommandSetterDelegate.cs" /> <Compile Include="Data\Common\MultiDelegatingDbProvider.cs" /> + <Compile Include="Data\Common\UserCredentialsDbProvider.cs" /> <Compile Include="Data\Config\DatabaseNamespaceParser.cs" /> <Compile Include="Data\Core\AdoAccessor.cs" /> |
From: Mark P. <mar...@us...> - 2008-01-29 18:14:18
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5166/Data/Common Added Files: UserCredentialsDbProvider.cs Log Message: SPRNET-858 - Added IDbProvider implementation, UserCredentialsDbProvider, to allow changing of username, password connection strings at runtime --- NEW FILE: UserCredentialsDbProvider.cs --- (This appears to be a binary file; contents omitted.) |
From: Mark P. <mar...@us...> - 2008-01-28 23:03:09
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Objects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14942 Modified Files: ITestObject.cs Log Message: misc test improvement Index: ITestObject.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Objects/ITestObject.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ITestObject.cs 8 Aug 2007 07:28:25 -0000 1.8 --- ITestObject.cs 28 Jan 2008 23:03:05 -0000 1.9 *************** *** 18,21 **** --- 18,22 ---- using System; + using System.Collections; namespace Spring.Objects *************** *** 37,40 **** --- 38,46 ---- } + ICollection Friends + { + get; + } + INestedTestObject Doctor { |
From: Mark P. <mar...@us...> - 2008-01-28 23:03:09
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14942/Factory/Support Modified Files: ObjectDefinitionBuilderTests.cs Log Message: misc test improvement Index: ObjectDefinitionBuilderTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Objects/Factory/Support/ObjectDefinitionBuilderTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ObjectDefinitionBuilderTests.cs 29 May 2007 14:42:33 -0000 1.3 --- ObjectDefinitionBuilderTests.cs 28 Jan 2008 23:03:05 -0000 1.4 *************** *** 21,25 **** --- 21,30 ---- #region Imports + using System; + using System.Collections; using NUnit.Framework; + using Spring.Context.Support; + using Spring.Objects.Factory.Config; + using Spring.Objects.Factory.Xml; #endregion *************** *** 119,122 **** --- 124,203 ---- Assert.IsTrue(rod.PropertyValues.Contains("Age")); } + + [Test] + public void Simple() + { + GenericApplicationContext ctx = new GenericApplicationContext(); + IObjectDefinitionFactory objectDefinitionFactory = new DefaultObjectDefinitionFactory(); + + ObjectDefinitionBuilder builder = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, + typeof (TestObject)); + + builder.AddPropertyValue("Age", 22) + .AddPropertyValue("Name", "Joe") + .AddPropertyReference("Spouse", "Spouse") + .SetSingleton(false); + + ctx.RegisterObjectDefinition("TestObject", builder.ObjectDefinition); + + builder = ObjectDefinitionBuilder.RootObjectDefinition(objectDefinitionFactory, typeof(TestObject)); + + IList friends = new ArrayList(); + friends.Add(new TestObject("Dan", 34)); + friends.Add(new TestObject("Mary", 33)); + builder.AddPropertyValue("Friends", friends) + .AddConstructorArg("Susan") + .AddConstructorArg(23) + .SetSingleton(false); + + ctx.RegisterObjectDefinition("Spouse", builder.ObjectDefinition); + + + + + TestObject to = ctx.GetObject("TestObject") as TestObject; + + Assert.IsNotNull(to); + + Assert.AreEqual("Joe", to.Name); + Assert.AreEqual(22, to.Age); + Assert.AreEqual(2,to.Spouse.Friends.Count); + Assert.AreEqual(23, to.Spouse.Age); + + /* + AbstractApplicationContext ctx = ContextRegistry.GetContext() as AbstractApplicationContext; + + + + //XmlObjectFactory objectFactory = ctx.ObjectFactory as XmlObjectFactory; + + IObjectFactory objectFactory = ctx.ObjectFactory; + + //DefaultListableObjectFactory + if (objectFactory != null) + { + Console.WriteLine("hi"); + } + //objectFactory.RegisterObjectDefinition("TestObject", builder.ObjectDefinition); + */ + + + + + } + + public void SimpleReader() + { + GenericApplicationContext applicationContext = new GenericApplicationContext(); + + + IObjectDefinitionReader objectDefinitionReader = new XmlObjectDefinitionReader(applicationContext); + + objectDefinitionReader.LoadObjectDefinitions("assembly://foo"); + + applicationContext.Refresh(); + + + } } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/src/Spring/Spring.Web/Objects/Factory/Support Modified Files: WebObjectUtils.cs Log Message: fixed SPRNET-838 Index: WebObjectUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectUtils.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WebObjectUtils.cs 3 Dec 2007 16:11:31 -0000 1.2 --- WebObjectUtils.cs 27 Jan 2008 23:29:55 -0000 1.3 *************** *** 182,189 **** { AssertUtils.ArgumentHasText(pageUrl, "pageUrl"); - if (s_log.IsDebugEnabled) - { - s_log.Debug("getting page type for " + pageUrl); - } HttpContext ctx = HttpContext.Current; --- 182,185 ---- *************** *** 193,197 **** } ! string rootedVPath = WebUtils.CombineVirtualPaths(ctx.Request.CurrentExecutionFilePath, pageUrl); if (s_log.IsDebugEnabled) { --- 189,224 ---- } ! try ! { ! Type pageType = GetCompiledPageType(pageUrl); ! return pageType; ! } ! catch (Exception ex) ! { ! string msg = String.Format("Unable to get page type for url [{0}]", pageUrl); ! s_log.Error(msg, ex); ! throw new ObjectCreationException(msg, ex); ! } ! } ! ! /// <summary> ! /// Calls the underlying ASP.NET infrastructure to obtain the compiled page type ! /// relative to the current <see cref="HttpRequest.CurrentExecutionFilePath"/>. ! /// </summary> ! /// <param name="pageUrl"> ! /// The filename of the ASPX page relative to the current <see cref="HttpRequest.CurrentExecutionFilePath"/> ! /// </param> ! /// <returns> ! /// The <see cref="System.Type"/> of the ASPX page ! /// referred to by the supplied <paramref name="pageUrl"/>. ! /// </returns> ! public static Type GetCompiledPageType(string pageUrl) ! { ! if (s_log.IsDebugEnabled) ! { ! s_log.Debug("getting page type for " + pageUrl); ! } ! ! string rootedVPath = WebUtils.CombineVirtualPaths(HttpContext.Current.Request.CurrentExecutionFilePath, pageUrl); if (s_log.IsDebugEnabled) { *************** *** 200,217 **** Type pageType = null; - try - { #if NET_2_0 ! pageType = BuildManager.GetCompiledType(rootedVPath); // requires rooted virtual path! #else ! pageType = CreatePageInstance(pageUrl).GetType(); #endif - } - catch(Exception ex) - { - string msg = String.Format("Unable to get page type for url [{0}]", pageUrl); - s_log.Error(msg, ex); - throw new ArgumentException(msg, ex); - } if (s_log.IsDebugEnabled) --- 227,235 ---- Type pageType = null; #if NET_2_0 ! pageType = BuildManager.GetCompiledType(rootedVPath); // requires rooted virtual path! #else ! pageType = CreatePageInstance(pageUrl).GetType(); #endif if (s_log.IsDebugEnabled) *************** *** 222,225 **** --- 240,244 ---- } + /// <summary> /// Gets the controls type from a given filename |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/test/Spring/Spring.Web.Tests/TestSupport Modified Files: TestWebContext.cs Log Message: fixed SPRNET-838 Index: TestWebContext.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestWebContext.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestWebContext.cs 21 Jan 2008 07:04:46 -0000 1.3 --- TestWebContext.cs 27 Jan 2008 23:29:55 -0000 1.4 *************** *** 44,48 **** _out = new StringWriter(); HttpWorkerRequest wr; ! if (Thread.GetDomain().GetData(".appPath") != null) { wr = new SimpleWorkerRequest(page, string.Empty, _out); --- 44,49 ---- _out = new StringWriter(); HttpWorkerRequest wr; ! object appPath = Thread.GetDomain().GetData(".appPath"); ! if (appPath != null) { wr = new SimpleWorkerRequest(page, string.Empty, _out); |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/src/Spring/Spring.Web/Web/Support Modified Files: PageHandlerFactory.cs Log Message: fixed SPRNET-838 Index: PageHandlerFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** PageHandlerFactory.cs 23 Aug 2007 08:27:08 -0000 1.33 --- PageHandlerFactory.cs 27 Jan 2008 23:29:55 -0000 1.34 *************** *** 91,95 **** lock (handlers.SyncRoot) { ! handler = (IHttpHandler) handlers[url]; if (handler != null) { --- 91,95 ---- lock (handlers.SyncRoot) { ! handler = (IHttpHandler)handlers[url]; if (handler != null) { *************** *** 113,117 **** string appPath = context.Request.ApplicationPath.TrimEnd('/'); string appRelativeVirtualPath = url; ! if(appRelativeVirtualPath.ToLower().StartsWith(appPath.ToLower())) { appRelativeVirtualPath = appRelativeVirtualPath.Substring(appPath.Length); --- 113,117 ---- string appPath = context.Request.ApplicationPath.TrimEnd('/'); string appRelativeVirtualPath = url; ! if (appRelativeVirtualPath.ToLower().StartsWith(appPath.ToLower())) { appRelativeVirtualPath = appRelativeVirtualPath.Substring(appPath.Length); *************** *** 159,163 **** else { ! Type pageType = WebObjectUtils.GetPageType(url); if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { --- 159,165 ---- else { ! Type pageType = null; ! pageType = WebObjectUtils.GetCompiledPageType(url); ! if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { *************** *** 201,205 **** // since we don't use sync, make it volatile private volatile IHttpHandler cachedHandler; ! // holds shared state for handlerType private Type handlerType; --- 203,207 ---- // since we don't use sync, make it volatile private volatile IHttpHandler cachedHandler; ! // holds shared state for handlerType private Type handlerType; *************** *** 296,308 **** if (processId != null) { ! handler = (IHttpHandler) ProcessManager.GetProcess(processId); } if (handler == null) { ! handler = (IHttpHandler) this.appContext.GetObject(this.pageId); if (handler is IProcess) { ! ((IProcess) handler).Start(url); } } --- 298,310 ---- if (processId != null) { ! handler = (IHttpHandler)ProcessManager.GetProcess(processId); } if (handler == null) { ! handler = (IHttpHandler)this.appContext.GetObject(this.pageId); if (handler is IProcess) { ! ((IProcess)handler).Start(url); } } *************** *** 318,322 **** if (handler is Control) { ! ControlInterceptor.EnsureControlIntercepted(appContext, (Control) handler); } else --- 320,324 ---- if (handler is Control) { ! ControlInterceptor.EnsureControlIntercepted(appContext, (Control)handler); } else *************** *** 324,328 **** if (handler is ISupportsWebDependencyInjection) { ! ((ISupportsWebDependencyInjection) handler).DefaultApplicationContext = appContext; } } --- 326,330 ---- if (handler is ISupportsWebDependencyInjection) { ! ((ISupportsWebDependencyInjection)handler).DefaultApplicationContext = appContext; } } *************** *** 412,416 **** /// <param name="appContext">Application context instance to retrieve page from.</param> /// <param name="pageName">Name of the page object to execute.</param> ! public SessionAwarePageHandler(IApplicationContext appContext, string pageName) : base(appContext, pageName) { } --- 414,419 ---- /// <param name="appContext">Application context instance to retrieve page from.</param> /// <param name="pageName">Name of the page object to execute.</param> ! public SessionAwarePageHandler(IApplicationContext appContext, string pageName) ! : base(appContext, pageName) { } |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/test/Spring/Spring.Web.Tests/Objects/Factory/Support Modified Files: WebObjectDefinitionFactoryTests.cs Log Message: fixed SPRNET-838 Index: WebObjectDefinitionFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Objects/Factory/Support/WebObjectDefinitionFactoryTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WebObjectDefinitionFactoryTests.cs 3 Dec 2007 16:11:31 -0000 1.2 --- WebObjectDefinitionFactoryTests.cs 27 Jan 2008 23:29:55 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- using System.Web; using NUnit.Framework; + using NUnitAspEx; using Spring.Objects.Factory.Config; *************** *** 35,40 **** /// <author>Erich Eichinger</author> /// <version>$Id$</version> ! [TestFixture] ! public sealed class WebObjectDefinitionFactoryTests { [Test] --- 36,41 ---- /// <author>Erich Eichinger</author> /// <version>$Id$</version> ! [AspTestFixture("/Test", "/Spring/Objects/Factory/Support")] ! public class WebObjectDefinitionFactoryTests { [Test] *************** *** 83,125 **** } - /// <summary> - /// This test must be moved in a initialized HttpRuntime AppDomain to work - /// </summary> - /// <remarks> - /// We keep this test here to ensure a minimum of checking expected behaviour - /// - in this case trying to compile the requested page. - /// </remarks> [Test] - [ExpectedException(typeof(ArgumentException))] public void ResolvesToPageRootDefinitionIfEndsWithASPX() { ! using (TestWebContext ctx = new TestWebContext("/Spring/Objects/Factory/Support", "/testform.aspx")) { WebObjectDefinitionFactory factory = new WebObjectDefinitionFactory(); IWebObjectDefinition definition ! = (IWebObjectDefinition)factory.CreateObjectDefinition("/testform.aspx", null, AppDomain.CurrentDomain); Assert.IsNotNull(definition, "CreateObjectDefinition with no parent is returning null (it must never do so)."); ! Assert.IsTrue( definition.IsPage, ".aspx extension must result in a page instance"); } } - /// <summary> - /// This test must be moved in a initialized HttpRuntime AppDomain to work - /// </summary> - /// <remarks> - /// We keep this test here to ensure a minimum of checking expected behaviour - /// - in this case trying to compile the requested page. - /// </remarks> [Test] - [ExpectedException(typeof(ArgumentException))] public void ResolvesToPageChildDefinitionIfEndsWithASPX() { ! using(TestWebContext ctx = new TestWebContext("/Spring/Objects/Factory/Support", "/testform.aspx")) { WebObjectDefinitionFactory factory = new WebObjectDefinitionFactory(); IWebObjectDefinition definition ! = (IWebObjectDefinition)factory.CreateObjectDefinition("/testform.aspx", "parentdefinition", AppDomain.CurrentDomain); Assert.IsNotNull(definition, "CreateObjectDefinition with parent is returning null (it must never do so)."); Assert.IsTrue(definition.IsPage, ".aspx extension must result in a page instance"); } } --- 84,124 ---- } [Test] public void ResolvesToPageRootDefinitionIfEndsWithASPX() { ! using (TestWebContext ctx = new TestWebContext("/Test", "testform.aspx")) { WebObjectDefinitionFactory factory = new WebObjectDefinitionFactory(); IWebObjectDefinition definition ! = (IWebObjectDefinition)factory.CreateObjectDefinition("/Test/testform.aspx", null, AppDomain.CurrentDomain); Assert.IsNotNull(definition, "CreateObjectDefinition with no parent is returning null (it must never do so)."); ! Assert.IsTrue(definition.IsPage, ".aspx extension must result in a page instance"); ! Assert.AreEqual(typeof(RootWebObjectDefinition), definition.GetType()); } } [Test] public void ResolvesToPageChildDefinitionIfEndsWithASPX() { ! using (TestWebContext ctx = new TestWebContext("/Test", "testform.aspx")) { WebObjectDefinitionFactory factory = new WebObjectDefinitionFactory(); IWebObjectDefinition definition ! = (IWebObjectDefinition)factory.CreateObjectDefinition("/Test/testform.aspx", "parentdefinition", AppDomain.CurrentDomain); Assert.IsNotNull(definition, "CreateObjectDefinition with parent is returning null (it must never do so)."); Assert.IsTrue(definition.IsPage, ".aspx extension must result in a page instance"); + Assert.AreEqual(typeof(ChildWebObjectDefinition), definition.GetType()); + } + } + + [Test] + [ExpectedException(typeof(ObjectCreationException))] + public void ThrowsArgumentExceptionOnNonExistingPath() + { + using (TestWebContext ctx = new TestWebContext("/Test", "testform.aspx")) + { + WebObjectDefinitionFactory factory = new WebObjectDefinitionFactory(); + IWebObjectDefinition definition + = (IWebObjectDefinition)factory.CreateObjectDefinition("/Test/DoesNotExist.aspx", "parentdefinition", AppDomain.CurrentDomain); } } |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2005.csproj Log Message: fixed SPRNET-838 Index: Spring.Web.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2005.csproj,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Spring.Web.Tests.2005.csproj 27 Jan 2008 20:43:33 -0000 1.26 --- Spring.Web.Tests.2005.csproj 27 Jan 2008 23:29:55 -0000 1.27 *************** *** 76,79 **** --- 76,80 ---- <Compile Include="Caching\AspNetCacheTests.cs" /> <Compile Include="Context\Support\HttpApplicationConfigurerTests.cs" /> + <Compile Include="Context\Support\WebApplicationContextTests.cs" /> <Compile Include="Core\IO\WebResourceTests.cs" /> <Compile Include="Data\Spring\Objects\Factory\Support\TestForm.aspx.cs"> |
From: Erich E. <oak...@us...> - 2008-01-27 23:30:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3960/test/Spring/Spring.Web.Tests/Web/Support Modified Files: PageHandlerFactoryTests.cs Log Message: fixed SPRNET-838 Index: PageHandlerFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support/PageHandlerFactoryTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PageHandlerFactoryTests.cs 21 Jan 2008 07:04:46 -0000 1.3 --- PageHandlerFactoryTests.cs 27 Jan 2008 23:29:55 -0000 1.4 *************** *** 23,26 **** --- 23,27 ---- using System; using System.Web; + using System.IO; using NUnit.Extensions.Asp.AspTester; using NUnit.Framework; *************** *** 63,69 **** [Test] ! public void BCLPageFactoryThrowsHttp404() { ! using (TestWebContext ctx = new TestWebContext("/Test", "/DoesNotExist.oaspx")) { try --- 64,70 ---- [Test] ! public void BCLPageHandlerFactoryBehavior() { ! using (TestWebContext ctx = new TestWebContext("/Test", "DoesNotExist.oaspx")) { try *************** *** 72,80 **** phf.GetHandler(HttpContext.Current, "GET", ctx.HttpWorkerRequest.GetFilePath(), ctx.HttpWorkerRequest.GetFilePathTranslated()); } catch (HttpException e) { ! Assert.AreEqual( 404, e.GetHttpCode() ); ! Assert.IsTrue( e.Message.IndexOf(ctx.HttpWorkerRequest.GetFilePath()) > 0); } } } --- 73,111 ---- phf.GetHandler(HttpContext.Current, "GET", ctx.HttpWorkerRequest.GetFilePath(), ctx.HttpWorkerRequest.GetFilePathTranslated()); } + #if NET_2_0 catch (HttpException e) { ! Assert.AreEqual(404, e.GetHttpCode()); ! Assert.IsTrue(e.Message.IndexOf(ctx.HttpWorkerRequest.GetFilePath()) > 0); } + #else + catch (FileNotFoundException) + { + } + #endif + } + } + + [Test] + public void PageHandlerFactoryBehavesLikeSystemPageHandlerFactory() + { + using (TestWebContext ctx = new TestWebContext("/Test", "DoesNotExist.aspx")) + { + try + { + IHttpHandlerFactory phf = new PageHandlerFactory(); + phf.GetHandler(HttpContext.Current, "GET", ctx.HttpWorkerRequest.GetFilePath(), ctx.HttpWorkerRequest.GetFilePathTranslated()); + } + #if NET_2_0 + catch (HttpException e) + { + Assert.AreEqual(404, e.GetHttpCode()); + Assert.IsTrue(e.Message.IndexOf(ctx.HttpWorkerRequest.GetFilePath()) > 0); + } + #else + catch (FileNotFoundException) + { + } + #endif } } |
From: Erich E. <oak...@us...> - 2008-01-27 20:43:37
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29098/test/Spring/Spring.Core.Tests Modified Files: Spring.Core.Tests.2005.csproj Log Message: fixed missing System.Windows.Forms reference in Spring.Core.Tests Index: Spring.Core.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2005.csproj,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** Spring.Core.Tests.2005.csproj 26 Nov 2007 14:16:29 -0000 1.70 --- Spring.Core.Tests.2005.csproj 27 Jan 2008 20:43:33 -0000 1.71 *************** *** 105,108 **** --- 105,109 ---- <Reference Include="System.Web" /> <Reference Include="System.Web.Services" /> + <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml"> <Name>System.XML</Name> |
From: Erich E. <oak...@us...> - 2008-01-27 20:43:36
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29098/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2005.csproj Log Message: fixed missing System.Windows.Forms reference in Spring.Core.Tests Index: Spring.Web.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2005.csproj,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Spring.Web.Tests.2005.csproj 15 Dec 2007 21:21:56 -0000 1.25 --- Spring.Web.Tests.2005.csproj 27 Jan 2008 20:43:33 -0000 1.26 *************** *** 121,125 **** <EmbeddedResource Include="Context\Support\HttpApplicationConfigurerTests.xml" /> <Content Include="Data\Spring\Objects\Factory\Support\TestForm.aspx" /> - <Content Include="Data\Spring\Web\Support\PageHandlerFactoryTests\bin\nunit.core.dll" /> <Content Include="Data\Spring\Web\Support\PageHandlerFactoryTests\TransferAfterSetResult.aspx" /> <Content Include="Data\Spring\Web\Support\PageHandlerFactoryTests\MaintainsSession1.aspx" /> --- 121,124 ---- |
From: Mark P. <mar...@us...> - 2008-01-25 21:37:55
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9381 Modified Files: dbproviders.xml Log Message: SPRNET-855 Update Oracle error code mapping to include ORA-2292 as a DataIntegrityViolationCodes SPRNET-856 Add 03000 as BadSqlGrammarCode and 40001 as CannotSerializeTransactioncode for Postgress providers. SPRNET-857 Improved MySql provider error code mappings for DataIntegrityViolationCodes Index: dbproviders.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Common/dbproviders.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** dbproviders.xml 6 Dec 2007 20:14:30 -0000 1.30 --- dbproviders.xml 25 Jan 2008 21:37:51 -0000 1.31 *************** *** 64,72 **** <constructor-arg name="parameterDbType" value="System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <constructor-arg name="parameterDbTypeProperty" value="SqlDbType"/> ! <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> <constructor-arg name="parameterNamePrefix" value="@"/> <constructor-arg name="exceptionType" value="System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> ! <constructor-arg name="useParameterPrefixInSql" value="true"/> <constructor-arg name="bindByName" value="true"/> <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for --- 64,72 ---- <constructor-arg name="parameterDbType" value="System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <constructor-arg name="parameterDbTypeProperty" value="SqlDbType"/> ! <constructor-arg name="parameterIsNullableProperty" value="IsNullable"/> <constructor-arg name="parameterNamePrefix" value="@"/> <constructor-arg name="exceptionType" value="System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <constructor-arg name="useParameterNamePrefixInParameterCollection" value="true"/> ! <constructor-arg name="useParameterPrefixInSql" value="true"/> <constructor-arg name="bindByName" value="true"/> <!-- this is only true for .net 1.1 kept it here just in case we want to revert back to this strategy for *************** *** 309,313 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1,1400,1722,2291</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 309,313 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1,1400,1722,2291,2292</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 358,362 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 358,362 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452,1557</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 400,404 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 400,404 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452,1557</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 446,450 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 446,450 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 488,492 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 488,492 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 533,537 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 533,537 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452,1557</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 575,579 **** </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> --- 575,579 ---- </property> <property name="ErrorCodes.DataIntegrityViolationCodes"> ! <value>1062,1169,1215,1216,1217,1451,1452,1557</value> </property> <property name="ErrorCodes.CannotAcquireLockCodes"> *************** *** 614,618 **** <!-- error codes taken from http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html --> <property name="ErrorCodes.badSqlGrammarCodes"> ! <value>42000,42601,42602,42622,42804</value> </property> <property name="ErrorCodes.DataAccessResourceFailureCodes"> --- 614,618 ---- <!-- error codes taken from http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html --> <property name="ErrorCodes.badSqlGrammarCodes"> ! <value>03000,42000,42601,42602,42622,42804</value> </property> <property name="ErrorCodes.DataAccessResourceFailureCodes"> *************** *** 625,628 **** --- 625,631 ---- <value>55P03</value> </property> + <property name="ErrorCodes.CannotSerializeTransactionCodes"> + <value>40001</value> + </property> <property name="ErrorCodes.DeadlockLoserCodes"> <value>40P01</value> *************** *** 656,660 **** <!-- error codes taken from http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html --> <property name="ErrorCodes.badSqlGrammarCodes"> ! <value>42000,42601,42602,42622,42804</value> </property> <property name="ErrorCodes.DataAccessResourceFailureCodes"> --- 659,663 ---- <!-- error codes taken from http://www.postgresql.org/docs/8.1/static/errcodes-appendix.html --> <property name="ErrorCodes.badSqlGrammarCodes"> ! <value>03000,42000,42601,42602,42622,42804</value> </property> <property name="ErrorCodes.DataAccessResourceFailureCodes"> *************** *** 667,670 **** --- 670,676 ---- <value>55P03</value> </property> + <property name="ErrorCodes.CannotSerializeTransactionCodes"> + <value>40001</value> + </property> <property name="ErrorCodes.DeadlockLoserCodes"> <value>40P01</value> |