springnet-commits Mailing List for Spring Framework .NET (Page 52)
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...> - 2007-08-29 03:42:13
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9441 Modified Files: HibernateTransactionManager.cs SpringSessionSynchronization.cs Log Message: NHibernate unit tests SPRNET-714 - SessionFactory not bound to thread local storage if DbProvider for HibernateTransactionManager is null SPRNET-715 - SpringSessionSynchronization did not close hibernate session with a nested transaction with TransactionPropagation.NotSupported Index: SpringSessionSynchronization.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/SpringSessionSynchronization.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SpringSessionSynchronization.cs 31 May 2007 20:25:13 -0000 1.1 --- SpringSessionSynchronization.cs 29 Aug 2007 03:42:06 -0000 1.2 *************** *** 61,65 **** /// Initializes a new instance of the <see cref="SpringSessionSynchronization"/> class. /// </summary> ! public SpringSessionSynchronization(SessionHolder sessionHolder, ISessionFactory sessionFactory, IAdoExceptionTranslator adoExceptionTranslator, bool newSession) { --- 61,65 ---- /// Initializes a new instance of the <see cref="SpringSessionSynchronization"/> class. /// </summary> ! public SpringSessionSynchronization(SessionHolder sessionHolder, ISessionFactory sessionFactory, IAdoExceptionTranslator adoExceptionTranslator, bool newSession) { *************** *** 241,261 **** public override void AfterCompletion(TransactionSynchronizationStatus status) { - if (!newSession) - { - ISession session = sessionHolder.Session; ! // Provide correct transaction status for releasing the Session's cache locks, ! // if possible. Else, closing will release all cache locks assuming a rollback. ! ISessionImplementor sessionImplementor = session as ISessionImplementor; ! if (sessionImplementor != null) ! { ! sessionImplementor.AfterTransactionCompletion(status == TransactionSynchronizationStatus.Committed); ! } - if (newSession) - { - SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, sessionFactory); - } - } if (!newSession && status != TransactionSynchronizationStatus.Committed) { --- 241,260 ---- public override void AfterCompletion(TransactionSynchronizationStatus status) { ! ISession session = sessionHolder.Session; ! ! // Provide correct transaction status for releasing the Session's cache locks, ! // if possible. Else, closing will release all cache locks assuming a rollback. ! ISessionImplementor sessionImplementor = session as ISessionImplementor; ! if (sessionImplementor != null) ! { ! sessionImplementor.AfterTransactionCompletion(status == TransactionSynchronizationStatus.Committed); ! } ! ! if (newSession) ! { ! SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, sessionFactory); ! } if (!newSession && status != TransactionSynchronizationStatus.Committed) { Index: HibernateTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/HibernateTransactionManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HibernateTransactionManager.cs 31 Jul 2007 18:17:45 -0000 1.2 --- HibernateTransactionManager.cs 29 Aug 2007 03:42:05 -0000 1.3 *************** *** 87,97 **** #region Constructor (s) - /// <summary> - /// Initializes a new instance of the <see cref="HibernateTransactionManager"/> class. - /// </summary> - public HibernateTransactionManager() - { ! } #endregion --- 87,107 ---- #region Constructor (s) ! /// <summary> ! /// Initializes a new instance of the <see cref="HibernateTransactionManager"/> class. ! /// </summary> ! public HibernateTransactionManager() ! { ! } ! ! /// <summary> ! /// Initializes a new instance of the <see cref="HibernateTransactionManager"/> class. ! /// </summary> ! /// <param name="sessionFactory">The session factory.</param> ! public HibernateTransactionManager(ISessionFactory sessionFactory) ! { ! this.sessionFactory = sessionFactory; ! AfterPropertiesSet(); ! } #endregion *************** *** 311,314 **** --- 321,326 ---- protected override void DoBegin(object transaction, ITransactionDefinition definition) { + HibernateTransactionObject txObject = (HibernateTransactionObject) transaction; + if (DbProvider != null && TransactionSynchronizationManager.HasResource(DbProvider)) { *************** *** 319,327 **** "on a single DbProvider, no matter whether Hibernate or ADO.NET access."); } - ISession session = null; try { ! HibernateTransactionObject txObject = (HibernateTransactionObject) transaction; if (txObject.SessionHolder == null) { --- 331,338 ---- "on a single DbProvider, no matter whether Hibernate or ADO.NET access."); } ISession session = null; try { ! if (txObject.SessionHolder == null) { *************** *** 391,406 **** TransactionSynchronizationManager.BindResource(DbProvider, conHolder); txObject.ConnectionHolder = conHolder; ! // Bind the session holder to the thread. ! if (txObject.NewSessionHolder) ! { ! TransactionSynchronizationManager.BindResource(SessionFactory, txObject.SessionHolder); ! } } ! }catch (Exception ex) { ! SessionFactoryUtils.CloseSession(session); ! throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex); } --- 402,417 ---- TransactionSynchronizationManager.BindResource(DbProvider, conHolder); txObject.ConnectionHolder = conHolder; + } ! // Bind the session holder to the thread. ! if (txObject.NewSessionHolder) ! { ! TransactionSynchronizationManager.BindResource(SessionFactory, txObject.SessionHolder); } ! } catch (Exception ex) { ! SessionFactoryUtils.CloseSession(session); ! throw new CannotCreateTransactionException("Could not open Hibernate Session for transaction", ex); } *************** *** 578,581 **** --- 589,593 ---- } + /// <summary> /// Set the given transaction rollback-only. Only called on rollback *************** *** 594,598 **** txObject.SessionHolder.Session + "] rollback-only"); } ! txObject.setRollbackOnly(); } --- 606,610 ---- txObject.SessionHolder.Session + "] rollback-only"); } ! txObject.SetRollbackOnly(); } *************** *** 694,701 **** TransactionSynchronizationManager.UnbindResource(DbProvider); } try { - IDbConnection con = txObject.SessionHolder.Session.Connection; //TODO investigate isolation level settings... //AdoUtils.ResetConnectionAfterTransaction(con, txObject.PreviousIsolationLevel); } --- 706,714 ---- TransactionSynchronizationManager.UnbindResource(DbProvider); } + /* try { //TODO investigate isolation level settings... + //IDbConnection con = txObject.SessionHolder.Session.Connection; //AdoUtils.ResetConnectionAfterTransaction(con, txObject.PreviousIsolationLevel); } *************** *** 704,707 **** --- 717,721 ---- log.Info("Could not access ADO.NET IDbConnection of Hibernate Session", ex); } + */ ISession session = txObject.SessionHolder.Session; if (txObject.NewSessionHolder) *************** *** 720,726 **** } if (txObject.SessionHolder.AssignedPreviousFlushMode) ! { session.FlushMode = txObject.SessionHolder.PreviousFlushMode; ! } } txObject.SessionHolder.Clear(); --- 734,740 ---- } if (txObject.SessionHolder.AssignedPreviousFlushMode) ! { session.FlushMode = txObject.SessionHolder.PreviousFlushMode; ! } } txObject.SessionHolder.Clear(); *************** *** 765,769 **** } ! public void setRollbackOnly() { SessionHolder.RollbackOnly = true; --- 779,783 ---- } ! public void SetRollbackOnly() { SessionHolder.RollbackOnly = true; *************** *** 774,781 **** } ! public bool IsRollbackOnly() { ! return SessionHolder.RollbackOnly || ! (ConnectionHolder != null && ConnectionHolder.RollbackOnly); } } --- 788,803 ---- } ! /// <summary> ! /// Return whether the transaction is internally marked as rollback-only. ! /// </summary> ! /// <value></value> ! /// <returns>True of the transaction is marked as rollback-only.</returns> ! public override bool RollbackOnly { ! get ! { ! return SessionHolder.RollbackOnly || ! (ConnectionHolder != null && ConnectionHolder.RollbackOnly); ! } } } |
From: Mark P. <mar...@us...> - 2007-08-28 15:54:03
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/Generic In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27236 Modified Files: HibernateDaoSupport.cs Log Message: Add missing methods to generic version of HibernateDaoSupport. Some general code cleanup.. Index: HibernateDaoSupport.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate12/Data/NHibernate/Generic/HibernateDaoSupport.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HibernateDaoSupport.cs 1 Jun 2007 02:34:12 -0000 1.1 --- HibernateDaoSupport.cs 28 Aug 2007 15:26:29 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- using System; using NHibernate; + using Spring.Dao; using Spring.Dao.Support; *************** *** 105,108 **** --- 106,135 ---- } } + + /// <summary> + /// Get a Hibernate Session, either from the current transaction or a new one. + /// The latter is only allowed if the "allowCreate" setting of this object's + /// HibernateTemplate is true. + /// </summary> + /// <remarks> + /// <p><b>Note that this is not meant to be invoked from HibernateTemplate code + /// but rather just in plain Hibernate code.</b> Use it in combination with + /// <b>ReleaseSession</b>. + /// </p> + /// <p>In general, it is recommended to use HibernateTemplate, either with + /// the provided convenience operations or with a custom HibernateCallback + /// that provides you with a Session to work on. HibernateTemplate will care + /// for all resource management and for proper exception conversion. + /// </p> + /// </remarks> + /// <value>The Hibernate session.</value> + public ISession Session + { + get + { + return DoGetSession(HibernateTemplate.AllowCreate); + } + } + #endregion *************** *** 123,138 **** } - #endregion - /// <summary> /// Check if the hibernate template property has been set. /// </summary> ! protected override void CheckDaoConfig() ! { ! if (this.hibernateTemplate == null) { throw new ArgumentException("sessionFactory or hibernateTemplate is required"); } ! } } } --- 150,233 ---- } /// <summary> /// Check if the hibernate template property has been set. /// </summary> ! protected override void CheckDaoConfig() ! { ! if (this.hibernateTemplate == null) { throw new ArgumentException("sessionFactory or hibernateTemplate is required"); } ! } ! /// <summary> ! /// Get a Hibernate Session, either from the current transaction or ! /// a new one. The latter is only allowed if "allowCreate" is true. ! /// </summary> ! /// <remarks>Note that this is not meant to be invoked from HibernateTemplate code ! /// but rather just in plain Hibernate code. Either rely on a thread-bound ! /// Session (via HibernateInterceptor), or use it in combination with ! /// ReleaseSession. ! /// <para> ! /// In general, it is recommended to use HibernateTemplate, either with ! /// the provided convenience operations or with a custom HibernateCallback ! /// that provides you with a Session to work on. HibernateTemplate will care ! /// for all resource management and for proper exception conversion. ! /// </para> ! /// </remarks> ! /// <param name="allowCreate"> if a non-transactional Session should be created when no ! /// transactional Session can be found for the current thread ! /// </param> ! /// <returns>Hibernate session.</returns> ! /// <exception cref="DataAccessResourceFailureException"> ! /// If the Session couldn't be created ! /// </exception> ! /// <exception cref="InvalidOperationException"> ! /// if no thread-bound Session found and allowCreate false ! /// </exception> ! /// <seealso cref="ReleaseSession"/> ! protected ISession DoGetSession(bool allowCreate) ! { ! return (!allowCreate ? ! SessionFactoryUtils.GetSession(SessionFactory, false) : ! SessionFactoryUtils.GetSession( ! SessionFactory, ! this.hibernateTemplate.EntityInterceptor, ! this.hibernateTemplate.AdoExceptionTranslator)); ! } ! ! /// <summary> ! /// Convert the given HibernateException to an appropriate exception from the ! /// <code>org.springframework.dao</code> hierarchy. Will automatically detect ! /// wrapped ADO.NET Exceptions and convert them accordingly. ! /// </summary> ! /// <param name="ex">HibernateException that occured.</param> ! /// <returns> ! /// The corresponding DataAccessException instance ! /// </returns> ! /// <remarks> ! /// The default implementation delegates to SessionFactoryUtils ! /// and convertAdoAccessException. Can be overridden in subclasses. ! /// </remarks> ! protected DataAccessException ConvertHibernateAccessException(HibernateException ex) ! { ! return hibernateTemplate.ConvertHibernateAccessException(ex); ! } ! ! /// <summary> ! /// Close the given Hibernate Session, created via this DAO's SessionFactory, ! /// if it isn't bound to the thread. ! /// </summary> ! /// <remarks> ! /// Typically used in plain Hibernate code, in combination with the ! /// Session property and ConvertHibernateAccessException. ! /// </remarks> ! /// <param name="session">The session to close.</param> ! protected void ReleaseSession(ISession session) ! { ! SessionFactoryUtils.ReleaseSession(session, SessionFactory); ! } ! #endregion ! ! } } |
From: Mark P. <mar...@us...> - 2007-08-28 15:54:03
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27251 Modified Files: HibernateDaoSupport.cs Log Message: Add missing methods to generic version of HibernateDaoSupport. Some general code cleanup.. Index: HibernateDaoSupport.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data.NHibernate/Data/NHibernate/Support/HibernateDaoSupport.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HibernateDaoSupport.cs 31 May 2007 20:25:14 -0000 1.1 --- HibernateDaoSupport.cs 28 Aug 2007 15:26:37 -0000 1.2 *************** *** 51,58 **** public abstract class HibernateDaoSupport : DaoSupport { ! // TODO update to latest codebase in java with some other convenience methods. ! ! ! #region Fields private HibernateTemplate hibernateTemplate; --- 51,55 ---- public abstract class HibernateDaoSupport : DaoSupport { ! #region Fields private HibernateTemplate hibernateTemplate; *************** *** 60,64 **** #endregion - #region Constructor (s) /// <summary> --- 57,60 ---- |
From: Erich E. <oak...@us...> - 2007-08-27 18:43:46
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Caching In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10815/Caching Log Message: Directory /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Caching added to the repository |
From: Erich E. <oak...@us...> - 2007-08-27 18:43:43
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/src/Spring/Spring.Core Modified Files: Spring.Core.2005.csproj Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Spring.Core.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Spring.Core.2005.csproj,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** Spring.Core.2005.csproj 24 Aug 2007 22:43:55 -0000 1.104 --- Spring.Core.2005.csproj 25 Aug 2007 14:26:34 -0000 1.105 *************** *** 73,96 **** </PropertyGroup> <ItemGroup> ! <Reference Include="antlr.runtime, Version=2.7.5.2, Culture=neutral"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> </Reference> ! <Reference Include="Common.Logging, Version=2.1.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> </Reference> <Reference Include="Microsoft.VisualBasic" /> ! <Reference Include="System"> ! <Name>System</Name> ! </Reference> <Reference Include="System.configuration" /> <Reference Include="System.Data" /> ! <Reference Include="System.Drawing"> ! <Name>System.Drawing</Name> ! </Reference> ! <Reference Include="System.Xml"> ! <Name>System.XML</Name> ! </Reference> </ItemGroup> <ItemGroup> --- 73,90 ---- </PropertyGroup> <ItemGroup> ! <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> </Reference> ! <Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> </Reference> <Reference Include="Microsoft.VisualBasic" /> ! <Reference Include="System" /> <Reference Include="System.configuration" /> <Reference Include="System.Data" /> ! <Reference Include="System.Drawing" /> ! <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> |
From: Erich E. <oak...@us...> - 2007-08-27 18:43:40
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2003.csproj Spring.Web.Tests.2005.csproj Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Spring.Web.Tests.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2003.csproj,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Spring.Web.Tests.2003.csproj 25 Aug 2007 10:21:59 -0000 1.31 --- Spring.Web.Tests.2003.csproj 25 Aug 2007 14:26:36 -0000 1.32 *************** *** 120,123 **** --- 120,128 ---- HintPath = "..\..\..\lib\Net\1.1\Common.Logging.dll" /> + <Reference + Name = "Rhino.Mocks" + AssemblyName = "Rhino.Mocks" + HintPath = "..\..\..\lib\Net\1.1\Rhino.Mocks.dll" + /> </References> </Build> *************** *** 199,203 **** <File RelPath = "Util\ControlInterceptionTests.cs" ! SubType = "ASPXCodeBehind" BuildAction = "Compile" /> --- 204,208 ---- <File RelPath = "Util\ControlInterceptionTests.cs" ! SubType = "Code" BuildAction = "Compile" /> 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.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Spring.Web.Tests.2005.csproj 24 Aug 2007 22:44:35 -0000 1.18 --- Spring.Web.Tests.2005.csproj 25 Aug 2007 14:26:36 -0000 1.19 *************** *** 75,111 **** </PropertyGroup> <ItemGroup> - <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> - </Reference> - <Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> - </Reference> - <Reference Include="nunit.framework"> - <Name>nunit.framework</Name> - <HintPath>..\..\..\lib\Net\1.1\nunit.framework.dll</HintPath> - </Reference> - <Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath> - </Reference> - <Reference Include="System"> - <Name>System</Name> - </Reference> - <Reference Include="System.configuration" /> - <Reference Include="System.Data"> - <Name>System.Data</Name> - </Reference> - <Reference Include="System.Drawing" /> - <Reference Include="System.Web"> - <Name>System.Web</Name> - </Reference> - <Reference Include="System.Web.Services" /> - <Reference Include="System.Xml"> - <Name>System.XML</Name> - </Reference> - </ItemGroup> - <ItemGroup> <Compile Include="AssemblyInfo.cs"> <SubType>Code</SubType> --- 75,78 ---- *************** *** 118,121 **** --- 85,89 ---- <SubType>ASPXCodeBehind</SubType> </Compile> + <Compile Include="Globalization\Resolvers\DefaultWebCultureResolverTests.cs" /> <Compile Include="Objects\Factory\Support\WebObjectDefinitionFactoryTests.cs" /> <Compile Include="Objects\Factory\Support\WebObjectFactoryTests.cs"> *************** *** 144,147 **** --- 112,147 ---- </ItemGroup> <ItemGroup> + <EmbeddedResource Include="Util\ControlInterceptionTests.objects.xml" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Context\Support\HttpApplicationConfigurerTests.xml" /> + <Content Include="Data\Spring\Objects\Factory\Support\TestForm.aspx" /> + </ItemGroup> + <ItemGroup> + <Reference Include="antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> + </Reference> + <Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> + </Reference> + <Reference Include="nunit.framework, Version=2.4.1.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\lib\Net\2.0\nunit.framework.dll</HintPath> + </Reference> + <Reference Include="Rhino.Mocks, Version=2.9.6.40380, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\lib\Net\2.0\Rhino.Mocks.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.configuration" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Web" /> + <Reference Include="System.Web.Services" /> + <Reference Include="System.XML" /> + </ItemGroup> + <ItemGroup> <ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2005.csproj"> <Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project> *************** *** 157,167 **** </ProjectReference> </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Util\ControlInterceptionTests.objects.xml" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Context\Support\HttpApplicationConfigurerTests.xml" /> - <Content Include="Data\Spring\Objects\Factory\Support\TestForm.aspx" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> --- 157,160 ---- |
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Globalization/Resolvers In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/src/Spring/Spring.Web/Globalization/Resolvers Modified Files: CookieCultureResolver.cs DefaultWebCultureResolver.cs RequestCultureResolver.cs SessionCultureResolver.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: CookieCultureResolver.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Globalization/Resolvers/CookieCultureResolver.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CookieCultureResolver.cs 18 May 2006 21:37:52 -0000 1.3 --- CookieCultureResolver.cs 25 Aug 2007 14:26:35 -0000 1.4 *************** *** 49,57 **** if (cookie != null) { ! return CultureInfo.CreateSpecificCulture(cookie.Value); } else { ! return GetDefaultLocale(); } } --- 49,57 ---- if (cookie != null) { ! return base.GetCulture(cookie.Value); } else { ! return base.GetDefaultLocale(); } } Index: DefaultWebCultureResolver.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Globalization/Resolvers/DefaultWebCultureResolver.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DefaultWebCultureResolver.cs 9 Aug 2006 23:46:53 -0000 1.4 --- DefaultWebCultureResolver.cs 25 Aug 2007 14:26:35 -0000 1.5 *************** *** 23,26 **** --- 23,27 ---- using System.Threading; using System.Web; + using Spring.Util; namespace Spring.Globalization.Resolvers *************** *** 41,59 **** protected override CultureInfo GetDefaultLocale() { - HttpContext context = HttpContext.Current; - if (DefaultCulture != null) { ! return DefaultCulture; } ! else if (context != null && context.Request.UserLanguages != null && context.Request.UserLanguages.Length > 0) { ! // ignore unconvertible browserlanguage ! try { return CultureInfo.CreateSpecificCulture(context.Request.UserLanguages[0].Split(';')[0]); } catch {} } return Thread.CurrentThread.CurrentUICulture; } /// <summary> /// Resolves the culture from the context. /// </summary> --- 42,85 ---- protected override CultureInfo GetDefaultLocale() { if (DefaultCulture != null) { ! return base.DefaultCulture; } ! ! CultureInfo culture = GetCulture(GetRequestLanguage()); ! if (culture != null) { ! return culture; } + return Thread.CurrentThread.CurrentUICulture; } /// <summary> + /// Extracts the users favorite language from "accept-language" header of the current request. + /// </summary> + /// <returns>a language string if any or <c>null</c>, if no languages have been sent with the request</returns> + protected virtual string GetRequestLanguage() + { + HttpContext context = HttpContext.Current; + if (context != null && context.Request != null && ArrayUtils.HasLength(context.Request.UserLanguages)) + { + return context.Request.UserLanguages[0]; + } + return null; + } + + /// <summary> + /// Resolves a culture by name. + /// </summary> + /// <param name="cultureName">the name of the culture to get</param> + /// <returns>a (possible neutral!) <see cref="CultureInfo"/> or <c>null</c>, if culture could not be resolved</returns> + public CultureInfo GetCulture(string cultureName) + { + try { return new CultureInfo(cultureName.Split(';')[0]); } catch { } + return null; + } + + /// <summary> /// Resolves the culture from the context. /// </summary> Index: SessionCultureResolver.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Globalization/Resolvers/SessionCultureResolver.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionCultureResolver.cs 18 May 2006 21:37:52 -0000 1.2 --- SessionCultureResolver.cs 25 Aug 2007 14:26:35 -0000 1.3 *************** *** 21,24 **** --- 21,25 ---- using System.Globalization; using System.Web; + using Spring.Util; namespace Spring.Globalization.Resolvers *************** *** 44,54 **** public override CultureInfo ResolveCulture() { ! if (HttpContext.Current.Session[CultureKey] != null) { ! return (CultureInfo) HttpContext.Current.Session[CultureKey]; } else { ! return GetDefaultLocale(); } } --- 45,56 ---- public override CultureInfo ResolveCulture() { ! CultureInfo culture = SessionCulture; ! if (culture != null) { ! return culture; } else { ! return base.GetDefaultLocale(); } } *************** *** 60,64 **** public override void SetCulture(CultureInfo culture) { ! HttpContext.Current.Session[CultureKey] = culture; } } --- 62,83 ---- public override void SetCulture(CultureInfo culture) { ! SessionCulture = culture; ! } ! ! /// <summary> ! /// Gets/Sets the current session's culture. ! /// </summary> ! protected virtual CultureInfo SessionCulture ! { ! set ! { ! AssertUtils.ArgumentNotNull(value, "SessionCulture"); ! HttpContext.Current.Session[CultureKey] = value; ! } ! get ! { ! CultureInfo culture = HttpContext.Current.Session[CultureKey] as CultureInfo; ! return culture; ! } } } Index: RequestCultureResolver.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Globalization/Resolvers/RequestCultureResolver.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RequestCultureResolver.cs 18 May 2006 21:37:52 -0000 1.3 --- RequestCultureResolver.cs 25 Aug 2007 14:26:35 -0000 1.4 *************** *** 23,26 **** --- 23,27 ---- using System.Threading; using System.Web; + using Spring.Util; namespace Spring.Globalization.Resolvers *************** *** 53,68 **** HttpContext context = HttpContext.Current; ! if (context.Request.UserLanguages != null && context.Request.UserLanguages.Length > 0) ! { ! return CultureInfo.CreateSpecificCulture(context.Request.UserLanguages[0]); ! } ! else if (DefaultCulture != null) { ! return DefaultCulture; } ! else { ! return Thread.CurrentThread.CurrentUICulture; } } --- 54,69 ---- HttpContext context = HttpContext.Current; ! CultureInfo culture = GetCulture(GetRequestLanguage()); ! if (culture != null) { ! return culture; } ! ! if (DefaultCulture != null) { ! return base.DefaultCulture; } + + return Thread.CurrentThread.CurrentUICulture; } |
From: Erich E. <oak...@us...> - 2007-08-27 17:44:05
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Globalization/Resolvers In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10876/Resolvers Log Message: Directory /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Globalization/Resolvers added to the repository |
From: Erich E. <oak...@us...> - 2007-08-27 17:44:04
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Web.Tests/Web/UI Modified Files: PageTests.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: PageTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/PageTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PageTests.cs 19 Feb 2007 17:56:44 -0000 1.2 --- PageTests.cs 25 Aug 2007 14:26:36 -0000 1.3 *************** *** 21,25 **** --- 21,30 ---- #region Imports + using System.Collections; + using System.Globalization; + using System.Threading; using NUnit.Framework; + using Spring.Globalization; + using Spring.Globalization.Resolvers; using Spring.Objects; using Spring.TestSupport; *************** *** 34,40 **** /// </summary> /// <author>Goran Milosavljevic</author> [TestFixture] ! public sealed class PageTests { [Test] public void Validate() --- 39,60 ---- /// </summary> /// <author>Goran Milosavljevic</author> + /// <author>Erich Eichinger</author> + /// <version>$Id$</version> [TestFixture] ! public class PageTests { + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + // ensure, uiCulture and culture are set to different cultures + CultureTestScope.Set(); + } + + [TestFixtureTearDown] + public void TestFixtureTearDown() + { + CultureTestScope.Reset(); + } + [Test] public void Validate() *************** *** 54,57 **** --- 74,98 ---- Assert.IsFalse(result); } + + [Test] + public void DefaultsToDefaultWebCultureResolver() + { + PageTest page = new PageTest(); + Assert.AreEqual( typeof(DefaultWebCultureResolver), page.CultureResolver.GetType() ); + } + + [Test] + public void AllowsNeutralUserCulture() + { + PageTest page = new PageTest(); + // DefaultWebCultureResolver does not allow culture to be set + page.CultureResolver = new DefaultCultureResolver(); + page.UserCulture = new CultureInfo("de"); + + page.InitializeCulture(); + Assert.AreEqual( page.UserCulture, Thread.CurrentThread.CurrentUICulture ); + Assert.AreEqual( CultureInfo.CreateSpecificCulture(page.UserCulture.Name), Thread.CurrentThread.CurrentCulture); + } + } } |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:59
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Testing.NUnit.Tests/Testing/NUnit/AnotherTest In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Testing.NUnit.Tests/Testing/NUnit/AnotherTest Modified Files: LoadAppContextTests.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: LoadAppContextTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Testing.NUnit.Tests/Testing/NUnit/AnotherTest/LoadAppContextTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LoadAppContextTests.cs 21 Aug 2007 19:26:14 -0000 1.2 --- LoadAppContextTests.cs 25 Aug 2007 14:26:35 -0000 1.3 *************** *** 1,3 **** - #if !NET_1_0 #region License --- 1,2 ---- *************** *** 20,23 **** --- 19,24 ---- #endregion + #if !NET_1_0 + #region Imports |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:54
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Web.Tests/TestSupport Modified Files: PageTestObject.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: PageTestObject.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/PageTestObject.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PageTestObject.cs 19 Feb 2007 17:56:44 -0000 1.1 --- PageTestObject.cs 25 Aug 2007 14:26:36 -0000 1.2 *************** *** 6,9 **** --- 6,14 ---- public class PageTest : Page { + public new void InitializeCulture() + { + base.InitializeCulture(); + } + protected override IDictionary CreateValidatorParameters() { |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:42
|
Update of /cvsroot/springnet/Spring.Net In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432 Modified Files: Spring.Net.1.1.2003.sln Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Spring.Net.1.1.2003.sln =================================================================== RCS file: /cvsroot/springnet/Spring.Net/Spring.Net.1.1.2003.sln,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Spring.Net.1.1.2003.sln 20 Aug 2007 18:38:10 -0000 1.10 --- Spring.Net.1.1.2003.sln 25 Aug 2007 14:26:33 -0000 1.11 *************** *** 66,72 **** Global GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug Debug-1.1 = Debug-1.1 - Release = Release Release-1.1 = Release-1.1 EndGlobalSection --- 66,70 ---- *************** *** 74,203 **** EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug.ActiveCfg = Debug-1.1|.NET - {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug.Build.0 = Debug-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug-1.1.Build.0 = Debug-1.1|.NET - {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release.ActiveCfg = Release-1.1|.NET - {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release.Build.0 = Release-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release-1.1.ActiveCfg = Release-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release-1.1.Build.0 = Release-1.1|.NET - {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug.ActiveCfg = Debug-1.1|.NET - {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug.Build.0 = Debug-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug-1.1.Build.0 = Debug-1.1|.NET - {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release.ActiveCfg = Release-1.1|.NET - {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release.Build.0 = Release-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release-1.1.ActiveCfg = Release-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release-1.1.Build.0 = Release-1.1|.NET - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug.ActiveCfg = Debug-1.1|.NET - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug.Build.0 = Debug-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug-1.1.Build.0 = Debug-1.1|.NET - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release.ActiveCfg = Release-1.1|.NET - {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release.Build.0 = Release-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release-1.1.ActiveCfg = Release-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release-1.1.Build.0 = Release-1.1|.NET - {2111596A-0327-4C9D-8919-294FBD988A23}.Debug.ActiveCfg = Debug-1.1|.NET - {2111596A-0327-4C9D-8919-294FBD988A23}.Debug.Build.0 = Debug-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Debug-1.1.Build.0 = Debug-1.1|.NET - {2111596A-0327-4C9D-8919-294FBD988A23}.Release.ActiveCfg = Release-1.1|.NET - {2111596A-0327-4C9D-8919-294FBD988A23}.Release.Build.0 = Release-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Release-1.1.ActiveCfg = Release-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Release-1.1.Build.0 = Release-1.1|.NET - {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug.ActiveCfg = Debug-1.1|.NET - {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug.Build.0 = Debug-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug-1.1.Build.0 = Debug-1.1|.NET - {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release.ActiveCfg = Release-1.1|.NET - {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release.Build.0 = Release-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release-1.1.ActiveCfg = Release-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release-1.1.Build.0 = Release-1.1|.NET - {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Debug.ActiveCfg = Debug-1.1|.NET - {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Debug.Build.0 = Debug-1.1|.NET {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.ActiveCfg = Debug-1.1|.NET ! {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Release.ActiveCfg = Release-1.1|.NET ! {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Release.Build.0 = Release-1.1|.NET {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.ActiveCfg = Release-1.1|.NET ! {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug.ActiveCfg = Debug-1.1|.NET ! {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug.Build.0 = Debug-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug-1.1.Build.0 = Debug-1.1|.NET - {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release.ActiveCfg = Release-1.1|.NET - {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release.Build.0 = Release-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release-1.1.ActiveCfg = Release-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release-1.1.Build.0 = Release-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug.ActiveCfg = Debug-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug.Build.0 = Debug-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.ActiveCfg = Release-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.Build.0 = Release-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release.ActiveCfg = Release-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release.Build.0 = Release-1.1|.NET {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.ActiveCfg = Release-1.1|.NET {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.Build.0 = Release-1.1|.NET - {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug.ActiveCfg = Debug-1.1|.NET - {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug.Build.0 = Debug-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug-1.1.Build.0 = Debug-1.1|.NET - {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release.ActiveCfg = Release-1.1|.NET - {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release.Build.0 = Release-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release-1.1.ActiveCfg = Release-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release-1.1.Build.0 = Release-1.1|.NET - {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug.ActiveCfg = Debug-1.1|.NET - {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug.Build.0 = Debug-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug-1.1.Build.0 = Debug-1.1|.NET - {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release.ActiveCfg = Release-1.1|.NET - {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release.Build.0 = Release-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release-1.1.ActiveCfg = Release-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release-1.1.Build.0 = Release-1.1|.NET - {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug.ActiveCfg = Debug-1.1|.NET - {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug.Build.0 = Debug-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug-1.1.Build.0 = Debug-1.1|.NET - {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release.ActiveCfg = Release-1.1|.NET - {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release.Build.0 = Release-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release-1.1.ActiveCfg = Release-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release-1.1.Build.0 = Release-1.1|.NET - {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug.ActiveCfg = Debug-1.1|.NET - {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug.Build.0 = Debug-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug-1.1.Build.0 = Debug-1.1|.NET - {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release.ActiveCfg = Release-1.1|.NET - {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release.Build.0 = Release-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release-1.1.ActiveCfg = Release-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release-1.1.Build.0 = Release-1.1|.NET - {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug.ActiveCfg = Debug-1.1|.NET - {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug.Build.0 = Debug-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug-1.1.Build.0 = Debug-1.1|.NET - {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release.ActiveCfg = Release-1.1|.NET - {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release.Build.0 = Release-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release-1.1.ActiveCfg = Release-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release-1.1.Build.0 = Release-1.1|.NET - {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug.ActiveCfg = Debug-1.1|.NET - {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug.Build.0 = Debug-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug-1.1.Build.0 = Debug-1.1|.NET - {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release.ActiveCfg = Release-1.1|.NET - {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release.Build.0 = Release-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release-1.1.ActiveCfg = Release-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release-1.1.Build.0 = Release-1.1|.NET - {8755D942-7828-4971-835B-37A5992C06C9}.Debug.ActiveCfg = Debug-1.1|.NET - {8755D942-7828-4971-835B-37A5992C06C9}.Debug.Build.0 = Debug-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Debug-1.1.Build.0 = Debug-1.1|.NET - {8755D942-7828-4971-835B-37A5992C06C9}.Release.ActiveCfg = Release-1.1|.NET - {8755D942-7828-4971-835B-37A5992C06C9}.Release.Build.0 = Release-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Release-1.1.ActiveCfg = Release-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Release-1.1.Build.0 = Release-1.1|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug.ActiveCfg = Debug|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug.Build.0 = Debug|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug-1.1.ActiveCfg = Debug|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug-1.1.Build.0 = Debug|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release.ActiveCfg = Release|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release.Build.0 = Release|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release-1.1.ActiveCfg = Release|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release-1.1.Build.0 = Release|.NET EndGlobalSection GlobalSection(SolutionItems) = postSolution --- 72,139 ---- EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug-1.1.Build.0 = Debug-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release-1.1.ActiveCfg = Release-1.1|.NET {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release-1.1.Build.0 = Release-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug-1.1.Build.0 = Debug-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release-1.1.ActiveCfg = Release-1.1|.NET {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release-1.1.Build.0 = Release-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug-1.1.Build.0 = Debug-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release-1.1.ActiveCfg = Release-1.1|.NET {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release-1.1.Build.0 = Release-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Debug-1.1.Build.0 = Debug-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Release-1.1.ActiveCfg = Release-1.1|.NET {2111596A-0327-4C9D-8919-294FBD988A23}.Release-1.1.Build.0 = Release-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Debug-1.1.Build.0 = Debug-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release-1.1.ActiveCfg = Release-1.1|.NET {BA4789EB-281A-48EA-8763-28B9F0596A18}.Release-1.1.Build.0 = Release-1.1|.NET {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.ActiveCfg = Debug-1.1|.NET ! {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.Build.0 = Debug-1.1|.NET {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.ActiveCfg = Release-1.1|.NET ! {EB2587B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.Build.0 = Release-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Debug-1.1.Build.0 = Debug-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release-1.1.ActiveCfg = Release-1.1|.NET {B58E34CF-6E70-481D-AC87-1BC2D13C21FB}.Release-1.1.Build.0 = Release-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.ActiveCfg = Debug-1.1|.NET ! {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Debug-1.1.Build.0 = Debug-1.1|.NET {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.ActiveCfg = Release-1.1|.NET {EB2687B7-8B26-4FBC-852A-4128D5CACAFC}.Release-1.1.Build.0 = Release-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Debug-1.1.Build.0 = Debug-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release-1.1.ActiveCfg = Release-1.1|.NET {E10A3BED-795F-41CB-A4A8-8C4B342ACDDF}.Release-1.1.Build.0 = Release-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Debug-1.1.Build.0 = Debug-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release-1.1.ActiveCfg = Release-1.1|.NET {C5585365-561C-4EC4-8956-87FFBD9AB1CD}.Release-1.1.Build.0 = Release-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Debug-1.1.Build.0 = Debug-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release-1.1.ActiveCfg = Release-1.1|.NET {A9D3732A-D40B-4C35-80CE-9C4A53D2DEAD}.Release-1.1.Build.0 = Release-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Debug-1.1.Build.0 = Debug-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release-1.1.ActiveCfg = Release-1.1|.NET {6B8639E3-88BB-4F7B-9F23-699E84C30D58}.Release-1.1.Build.0 = Release-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Debug-1.1.Build.0 = Debug-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release-1.1.ActiveCfg = Release-1.1|.NET {E8467024-8AE3-44A4-BAAD-1D78747EC7BD}.Release-1.1.Build.0 = Release-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Debug-1.1.Build.0 = Debug-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release-1.1.ActiveCfg = Release-1.1|.NET {8DA67FF2-C473-4329-8FF6-3747182196D7}.Release-1.1.Build.0 = Release-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Debug-1.1.ActiveCfg = Debug-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Debug-1.1.Build.0 = Debug-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Release-1.1.ActiveCfg = Release-1.1|.NET {8755D942-7828-4971-835B-37A5992C06C9}.Release-1.1.Build.0 = Release-1.1|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug-1.1.ActiveCfg = Debug-1.1|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Debug-1.1.Build.0 = Debug-1.1|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release-1.1.ActiveCfg = Release-1.1|.NET ! {E2689B4A-A951-420E-A274-BE5EBCD5F8D8}.Release-1.1.Build.0 = Release-1.1|.NET EndGlobalSection GlobalSection(SolutionItems) = postSolution |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:36
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Globalization In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv10862/Globalization Log Message: Directory /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Globalization added to the repository |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:27
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/src/Spring/Spring.Aop Modified Files: Spring.Aop.2005.csproj Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Spring.Aop.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Spring.Aop.2005.csproj,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Spring.Aop.2005.csproj 10 Aug 2007 17:39:45 -0000 1.32 --- Spring.Aop.2005.csproj 25 Aug 2007 14:26:34 -0000 1.33 *************** *** 79,83 **** <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> </Reference> ! <Reference Include="Common.Logging, Version=2.1.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> --- 79,83 ---- <HintPath>..\..\..\lib\Net\2.0\antlr.runtime.dll</HintPath> </Reference> ! <Reference Include="Common.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=65e474d141e25e07, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\lib\Net\2.0\Common.Logging.dll</HintPath> |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:23
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/src/Spring/Spring.Web/Web/UI Modified Files: Page.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Page.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Page.cs,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** Page.cs 23 Aug 2007 10:38:12 -0000 1.83 --- Page.cs 25 Aug 2007 14:26:35 -0000 1.84 *************** *** 231,236 **** #endif { ! Thread.CurrentThread.CurrentCulture = UserCulture; ! Thread.CurrentThread.CurrentUICulture = UserCulture; } --- 231,244 ---- #endif { ! CultureInfo userCulture = this.UserCulture; ! Thread.CurrentThread.CurrentUICulture = userCulture; ! if (userCulture.IsNeutralCulture) ! { ! Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(userCulture.Name); ! } ! else ! { ! Thread.CurrentThread.CurrentCulture = userCulture; ! } } *************** *** 1492,1497 **** { CultureResolver.SetCulture(value); - Thread.CurrentThread.CurrentCulture = value; Thread.CurrentThread.CurrentUICulture = value; OnUserCultureChanged(EventArgs.Empty); } --- 1500,1512 ---- { CultureResolver.SetCulture(value); Thread.CurrentThread.CurrentUICulture = value; + if (value.IsNeutralCulture) + { + Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(value.Name); + } + else + { + Thread.CurrentThread.CurrentCulture = value; + } OnUserCultureChanged(EventArgs.Empty); } |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:22
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Testing.NUnit.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Testing.NUnit.Tests Modified Files: Spring.Testing.NUnit.Tests.2003.csproj Spring.Testing.NUnit.Tests.2005.csproj Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project Index: Spring.Testing.NUnit.Tests.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2003.csproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Spring.Testing.NUnit.Tests.2003.csproj 22 Aug 2007 20:17:05 -0000 1.2 --- Spring.Testing.NUnit.Tests.2003.csproj 25 Aug 2007 14:26:35 -0000 1.3 *************** *** 24,28 **** > <Config ! Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" --- 24,28 ---- > <Config ! Name = "Debug-1.1" AllowUnsafeBlocks = "false" BaseAddress = "285212672" *************** *** 44,48 **** /> <Config ! Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" --- 44,48 ---- /> <Config ! Name = "Release-1.1" AllowUnsafeBlocks = "false" BaseAddress = "285212672" Index: Spring.Testing.NUnit.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2005.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Spring.Testing.NUnit.Tests.2005.csproj 20 Aug 2007 18:38:11 -0000 1.1 --- Spring.Testing.NUnit.Tests.2005.csproj 25 Aug 2007 14:26:35 -0000 1.2 *************** *** 79,87 **** </Content> </ItemGroup> - <ItemGroup> - <Folder Include="Properties\" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> --- 79,84 ---- </Content> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> ! <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> |
From: Erich E. <oak...@us...> - 2007-08-27 17:43:14
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Caching In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Core.Tests/Caching Added Files: AbstractCacheTests.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project --- NEW FILE: AbstractCacheTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2007-08-27 16:43:40
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Globalization/Resolvers In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12432/test/Spring/Spring.Web.Tests/Globalization/Resolvers Added Files: DefaultWebCultureResolverTests.cs Log Message: fixed SPRNET-659 added missing files AbstractCacheTests added Tests for Spring.Web/Globalization/Resolvers fixed Spring.Testing.NUnit.Tests.2003 project --- NEW FILE: DefaultWebCultureResolverTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2007-08-27 15:18:49
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Reflection/Dynamic In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19637 Modified Files: DynamicReflectionManager.cs Log Message: even more xml doc comments Index: DynamicReflectionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Reflection/Dynamic/DynamicReflectionManager.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DynamicReflectionManager.cs 8 Aug 2007 04:05:37 -0000 1.1 --- DynamicReflectionManager.cs 27 Aug 2007 15:18:43 -0000 1.2 *************** *** 32,40 **** namespace Spring.Reflection.Dynamic { ! public delegate IDynamicProperty CreatePropertyCallback(PropertyInfo property); ! public delegate IDynamicField CreateFieldCallback(FieldInfo property); ! public delegate IDynamicMethod CreateMethodCallback(MethodInfo method); ! public delegate IDynamicConstructor CreateConstructorCallback(ConstructorInfo constructor); ! public delegate IDynamicIndexer CreateIndexerCallback(PropertyInfo indexer); /// <summary> --- 32,55 ---- namespace Spring.Reflection.Dynamic { ! /// <summary> ! /// Represents a callback method used to create an <see cref="IDynamicProperty"/> from a <see cref="PropertyInfo"/> instance. ! /// </summary> ! internal delegate IDynamicProperty CreatePropertyCallback(PropertyInfo property); ! /// <summary> ! /// Represents a callback method used to create an <see cref="IDynamicField"/> from a <see cref="FieldInfo"/> instance. ! /// </summary> ! internal delegate IDynamicField CreateFieldCallback(FieldInfo property); ! /// <summary> ! /// Represents a callback method used to create an <see cref="IDynamicMethod"/> from a <see cref="MethodInfo"/> instance. ! /// </summary> ! internal delegate IDynamicMethod CreateMethodCallback(MethodInfo method); ! /// <summary> ! /// Represents a callback method used to create an <see cref="IDynamicConstructor"/> from a <see cref="ConstructorInfo"/> instance. ! /// </summary> ! internal delegate IDynamicConstructor CreateConstructorCallback(ConstructorInfo constructor); ! /// <summary> ! /// Represents a callback method used to create an <see cref="IDynamicIndexer"/> from a <see cref="PropertyInfo"/> instance. ! /// </summary> ! internal delegate IDynamicIndexer CreateIndexerCallback(PropertyInfo indexer); /// <summary> *************** *** 109,113 **** /// <param name="createCallback">callback function that will be called to create the dynamic property</param> /// <returns>An <see cref="IDynamicProperty"/> for the given property info.</returns> ! public static IDynamicProperty GetDynamicProperty(PropertyInfo property, CreatePropertyCallback createCallback) { lock (propertyCache.SyncRoot) --- 124,128 ---- /// <param name="createCallback">callback function that will be called to create the dynamic property</param> /// <returns>An <see cref="IDynamicProperty"/> for the given property info.</returns> ! internal static IDynamicProperty GetDynamicProperty(PropertyInfo property, CreatePropertyCallback createCallback) { lock (propertyCache.SyncRoot) *************** *** 129,133 **** /// <param name="createCallback">callback function that will be called to create the dynamic field</param> /// <returns>An <see cref="IDynamicField"/> for the given field info.</returns> ! public static IDynamicField GetDynamicField(FieldInfo field, CreateFieldCallback createCallback) { lock (fieldCache.SyncRoot) --- 144,148 ---- /// <param name="createCallback">callback function that will be called to create the dynamic field</param> /// <returns>An <see cref="IDynamicField"/> for the given field info.</returns> ! internal static IDynamicField GetDynamicField(FieldInfo field, CreateFieldCallback createCallback) { lock (fieldCache.SyncRoot) *************** *** 149,153 **** /// <param name="createCallback">callback function that will be called to create the dynamic indexer</param> /// <returns>An <see cref="IDynamicIndexer"/> for the given indexer.</returns> ! public static IDynamicIndexer GetDynamicIndexer(PropertyInfo indexer, CreateIndexerCallback createCallback) { lock (indexerCache.SyncRoot) --- 164,168 ---- /// <param name="createCallback">callback function that will be called to create the dynamic indexer</param> /// <returns>An <see cref="IDynamicIndexer"/> for the given indexer.</returns> ! internal static IDynamicIndexer GetDynamicIndexer(PropertyInfo indexer, CreateIndexerCallback createCallback) { lock (indexerCache.SyncRoot) *************** *** 169,173 **** /// <param name="createCallback">callback function that will be called to create the dynamic method</param> /// <returns>An <see cref="IDynamicMethod"/> for the given method.</returns> ! public static IDynamicMethod GetDynamicMethod(MethodInfo method, CreateMethodCallback createCallback) { lock (methodCache.SyncRoot) --- 184,188 ---- /// <param name="createCallback">callback function that will be called to create the dynamic method</param> /// <returns>An <see cref="IDynamicMethod"/> for the given method.</returns> ! internal static IDynamicMethod GetDynamicMethod(MethodInfo method, CreateMethodCallback createCallback) { lock (methodCache.SyncRoot) *************** *** 189,193 **** /// <param name="createCallback">callback function that will be called to create the dynamic constructor</param> /// <returns>An <see cref="IDynamicConstructor"/> for the given constructor.</returns> ! public static IDynamicConstructor GetDynamicConstructor(ConstructorInfo constructor, CreateConstructorCallback createCallback) { lock (constructorCache.SyncRoot) --- 204,208 ---- /// <param name="createCallback">callback function that will be called to create the dynamic constructor</param> /// <returns>An <see cref="IDynamicConstructor"/> for the given constructor.</returns> ! internal static IDynamicConstructor GetDynamicConstructor(ConstructorInfo constructor, CreateConstructorCallback createCallback) { lock (constructorCache.SyncRoot) |
From: Erich E. <oak...@us...> - 2007-08-27 15:18:37
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19624 Modified Files: DefaultListableObjectFactory.cs Log Message: even more xml doc comments Index: DefaultListableObjectFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** DefaultListableObjectFactory.cs 31 Jul 2007 00:08:58 -0000 1.40 --- DefaultListableObjectFactory.cs 27 Aug 2007 15:18:34 -0000 1.41 *************** *** 35,266 **** namespace Spring.Objects.Factory.Support { ! /// <summary> ! /// Concrete implementation of the ! /// <see cref="Spring.Objects.Factory.IListableObjectFactory"/> and ! /// <see cref="Spring.Objects.Factory.Support.IObjectDefinitionRegistry"/> ! /// interfaces. ! /// </summary> ! /// <remarks> ! /// <p> [...1554 lines suppressed...] ! // else, match the object instance... ! if (isFactoryType) ! { ! factoryObjectName = ObjectFactoryUtils.BuildFactoryObjectName(objectName); ! } ! if (IsObjectTypeMatch(factoryObjectName, type)) ! { ! result.Add(factoryObjectName); ! } ! } ! } ! } ! } ! return result; ! } ! #endregion ! } ! } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2007-08-27 15:18:29
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeResolution In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19607 Modified Files: TypeResolver.cs Log Message: even more xml doc comments Index: TypeResolver.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TypeResolver.cs 1 Aug 2007 23:24:11 -0000 1.2 --- TypeResolver.cs 27 Aug 2007 15:18:24 -0000 1.3 *************** *** 149,152 **** --- 149,156 ---- } + /// <summary> + /// Creates a new <see cref="TypeLoadException"/> instance + /// from the given <paramref name="typeName"/> + /// </summary> protected static TypeLoadException BuildTypeLoadException(string typeName) { *************** *** 154,157 **** --- 158,165 ---- } + /// <summary> + /// Creates a new <see cref="TypeLoadException"/> instance + /// from the given <paramref name="typeName"/> with the given inner <see cref="Exception"/> + /// </summary> protected static TypeLoadException BuildTypeLoadException(string typeName, Exception ex) { |
From: Erich E. <oak...@us...> - 2007-08-27 14:49:50
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Config In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6039/Config Modified Files: PropertyResourceConfigurer.cs VariableAccessor.cs Log Message: more xml doc comments Index: VariableAccessor.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Config/VariableAccessor.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** VariableAccessor.cs 22 Aug 2007 20:16:27 -0000 1.1 --- VariableAccessor.cs 27 Aug 2007 14:49:42 -0000 1.2 *************** *** 95,98 **** --- 95,107 ---- } + /// <summary> + /// Returns a <see cref="double"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="double"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public double GetDouble(string name, double defaultValue) { *************** *** 100,103 **** --- 109,125 ---- } + /// <summary> + /// Returns a <see cref="double"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="double"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public double GetDouble(string name, double defaultValue, bool throwOnInvalidValue) { *************** *** 120,123 **** --- 142,154 ---- } + /// <summary> + /// Returns a <see cref="decimal"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="decimal"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public decimal GetDecimal(string name, decimal defaultValue) { *************** *** 125,128 **** --- 156,172 ---- } + /// <summary> + /// Returns a <see cref="decimal"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="decimal"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public decimal GetDecimal(string name, decimal defaultValue, bool throwOnInvalidValue) { *************** *** 145,148 **** --- 189,201 ---- } + /// <summary> + /// Returns a <see cref="long"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="long"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public long GetInt64(string name, long defaultValue) { *************** *** 150,153 **** --- 203,219 ---- } + /// <summary> + /// Returns a <see cref="long"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="long"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public long GetInt64(string name, long defaultValue, bool throwOnInvalidValue) { *************** *** 170,173 **** --- 236,248 ---- } + /// <summary> + /// Returns a <see cref="ulong"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="ulong"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public ulong GetUInt64(string name, ulong defaultValue) { *************** *** 175,178 **** --- 250,266 ---- } + /// <summary> + /// Returns a <see cref="ulong"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="ulong"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public ulong GetUInt64(string name, ulong defaultValue, bool throwOnInvalidValue) { *************** *** 195,198 **** --- 283,295 ---- } + /// <summary> + /// Returns a <see cref="int"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="int"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public int GetInt32(string name, int defaultValue) { *************** *** 200,203 **** --- 297,313 ---- } + /// <summary> + /// Returns a <see cref="int"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="int"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public int GetInt32(string name, int defaultValue, bool throwOnInvalidValue) { *************** *** 220,223 **** --- 330,342 ---- } + /// <summary> + /// Returns a <see cref="uint"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="uint"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public uint GetUInt32(string name, uint defaultValue) { *************** *** 225,228 **** --- 344,360 ---- } + /// <summary> + /// Returns a <see cref="uint"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="uint"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public uint GetUInt32(string name, uint defaultValue, bool throwOnInvalidValue) { *************** *** 245,248 **** --- 377,389 ---- } + /// <summary> + /// Returns a <see cref="short"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="short"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public short GetInt16(string name, short defaultValue) { *************** *** 250,253 **** --- 391,407 ---- } + /// <summary> + /// Returns a <see cref="short"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="short"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public short GetInt16(string name, short defaultValue, bool throwOnInvalidValue) { *************** *** 270,273 **** --- 424,436 ---- } + /// <summary> + /// Returns a <see cref="short"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="short"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public ushort GetUInt16(string name, ushort defaultValue) { *************** *** 275,278 **** --- 438,454 ---- } + /// <summary> + /// Returns a <see cref="short"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="short"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public ushort GetUInt16(string name, ushort defaultValue, bool throwOnInvalidValue) { *************** *** 295,298 **** --- 471,483 ---- } + /// <summary> + /// Returns a <see cref="byte"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="byte"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public byte GetByte(string name, byte defaultValue) { *************** *** 300,303 **** --- 485,501 ---- } + /// <summary> + /// Returns a <see cref="byte"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="byte"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public byte GetByte(string name, byte defaultValue, bool throwOnInvalidValue) { *************** *** 320,323 **** --- 518,530 ---- } + /// <summary> + /// Returns a <see cref="Guid"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="Guid"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public Guid GetGuid(string name, Guid defaultValue) { *************** *** 325,328 **** --- 532,548 ---- } + /// <summary> + /// Returns a <see cref="Guid"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="Guid"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public Guid GetGuid(string name, Guid defaultValue, bool throwOnInvalidValue) { *************** *** 345,348 **** --- 565,578 ---- } + /// <summary> + /// Returns a <see cref="DateTime"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="format">The expected format of the variable's value</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="DateTime"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public DateTime GetDateTime(string name, string format, DateTime defaultValue) { *************** *** 350,353 **** --- 580,597 ---- } + /// <summary> + /// Returns a <see cref="DateTime"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="format">The expected format of the variable's value</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="DateTime"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public DateTime GetDateTime(string name, string format, DateTime defaultValue, bool throwOnInvalidValue) { *************** *** 377,380 **** --- 621,633 ---- } + /// <summary> + /// Returns a <see cref="char"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="char"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public char GetChar(string name, char defaultValue) { *************** *** 382,385 **** --- 635,651 ---- } + /// <summary> + /// Returns a <see cref="char"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="char"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public char GetChar(string name, char defaultValue, bool throwOnInvalidValue) { *************** *** 406,409 **** --- 672,684 ---- } + /// <summary> + /// Returns a <see cref="bool"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// A <see cref="bool"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public bool GetBoolean(string name, bool defaultValue) { *************** *** 411,414 **** --- 686,702 ---- } + /// <summary> + /// Returns a <see cref="bool"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// A <see cref="bool"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public bool GetBoolean(string name, bool defaultValue, bool throwOnInvalidValue) { *************** *** 431,434 **** --- 719,731 ---- } + /// <summary> + /// Returns an <see cref="Enum"/> of type <paramref name="defaultValue.GetType()"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <returns> + /// An <see cref="Enum"/> of type <paramref name="defaultValue.GetType()"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public Enum GetEnum(string name, Enum defaultValue) { *************** *** 436,439 **** --- 733,749 ---- } + /// <summary> + /// Returns an <see cref="Enum"/> of type <paramref name="defaultValue.GetType()"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>.</param> + /// <param name="throwOnInvalidValue"> + /// If <c>false</c>, suppresses exceptions if the result + /// of <see cref="IVariableSource.ResolveVariable"/> cannot be parsed + /// and returns <paramref name="defaultValue"/> instead.</param> + /// <returns> + /// An <see cref="Enum"/> of type <paramref name="defaultValue.GetType()"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> cannot be parsed. + /// </returns> public Enum GetEnum(string name, Enum defaultValue, bool throwOnInvalidValue) { *************** *** 455,458 **** --- 765,777 ---- } + /// <summary> + /// Returns a <see cref="string"/> that contains the value of the specified variable. + /// </summary> + /// <param name="name">The name of the variable to be read.</param> + /// <param name="defaultValue">The value to be returned if <see cref="IVariableSource.ResolveVariable"/> returns <see lang="null"/> or <see cref="String.Empty"/>.</param> + /// <returns> + /// A <see cref="string"/> that contains the value of the specified variable + /// or <paramref name="defaultValue"/>, if <see cref="IVariableSource.ResolveVariable"/> returns <c>null</c>. + /// </returns> public string GetString(string name, string defaultValue) { Index: PropertyResourceConfigurer.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Config/PropertyResourceConfigurer.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PropertyResourceConfigurer.cs 22 Aug 2007 08:52:03 -0000 1.18 --- PropertyResourceConfigurer.cs 27 Aug 2007 14:49:42 -0000 1.19 *************** *** 32,207 **** namespace Spring.Objects.Factory.Config { ! /// <summary> ! /// Allows for the configuration of individual object property values from ! /// a .NET .config file. ! /// </summary> ! /// <remarks> ! /// <p> ! /// Useful for custom .NET .config files targetted at system administrators ! /// that override object properties configured in the application context. ! /// </p> ! /// <p> ! /// Two concrete implementations are provided in the Spring.NET core library: ! /// <list type="bullet"> ! /// <item> ! /// <description> ! /// <see cref="Spring.Objects.Factory.Config.PropertyOverrideConfigurer"/> ! /// for <c><add key="placeholderKey" value="..."/></c> style ! /// overriding (pushing values from a .NET .config file into object ! /// definitions). ! /// </description> ! /// </item> ! /// <item> ! /// <description> ! /// <see cref="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer"/> ! /// for replacing "${...}" placeholders (pulling values from a .NET .config ! /// file into object definitions). ! /// </description> ! /// </item> ! /// </list> ! /// </p> ! /// <p> ! /// Please refer to the API documentation for the concrete implementations ! /// listed above for example usage. ! /// </p> ! /// </remarks> ! /// <author>Juergen Hoeller</author> ! /// <author>Simon White (.NET)</author> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyOverrideConfigurer"/> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer"/> ! /// <version>$Id$</version> [Serializable] public abstract class PropertyResourceConfigurer ! : IObjectFactoryPostProcessor, IOrdered ! { ! /// <summary> ! /// The default configuration section name to use if none is explictly supplied. ! /// </summary> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.ConfigSections"/> ! public const string DefaultConfigSectionName = "spring-config"; ! #region Fields ! private static readonly ILog _log = LogManager.GetLogger(typeof (PropertyResourceConfigurer)); ! private int _order = Int32.MaxValue; // default: same as non-Ordered ! private NameValueCollection _defaultProperties; ! private IResource[] _locations; ! private string[] _configSections; ! private bool _ignoreResourceNotFound = false; ! private bool _lastLocationOverrides = true; ! #endregion ! #region Constructor (s) / Destructor ! /// <summary> ! /// Creates a new instance of the ! /// <see cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer"/> ! /// class. ! /// </summary> ! /// <remarks> ! /// <p> ! /// This is an <see langword="abstract"/> class, and as such exposes no ! /// public constructors. ! /// </p> ! /// </remarks> ! protected PropertyResourceConfigurer() ! { ! } ! #endregion ! #region Properties ! /// <summary> ! /// The policy for resolving conflicting property overrides from ! /// several resources. ! /// </summary> ! /// <remarks> ! /// <p> ! /// When merging conflicting property overrides from several resources, ! /// should append an override with the same key be appended to the ! /// current value, or should the property override from the last resource ! /// processed override previous values? ! /// </p> ! /// <p> ! /// The default value is <see langword="true"/>; i.e. a property ! /// override from the last resource to be processed overrides previous ! /// values. ! /// </p> ! /// </remarks> ! /// <value> ! /// <see langword="true"/> if the property override from the last resource ! /// processed overrides previous values. ! /// </value> ! public bool LastLocationOverrides ! { ! set { _lastLocationOverrides = value; } ! } ! /// <summary> ! /// Return the order value of this object, where a higher value means greater in ! /// terms of sorting. ! /// </summary> ! /// <returns>The order value.</returns> ! /// <seealso cref="Spring.Core.IOrdered.Order"/> ! public int Order ! { ! get { return _order; } ! set { _order = value; } ! } ! /// <summary> ! /// The default properties to be applied. ! /// </summary> ! /// <remarks> ! /// <p> ! /// These are to be considered defaults, to be overridden by values ! /// loaded from other resources. ! /// </p> ! /// </remarks> ! public NameValueCollection Properties ! { ! get { return _defaultProperties; } ! set { _defaultProperties = value; } ! } ! /// <summary> ! /// The location of the .NET .config file that contains the property ! /// overrides that are to be applied. ! /// </summary> ! public IResource Location ! { ! set { _locations = new IResource[] {value}; } ! } ! /// <summary> ! /// The locations of the .NET .config files containing the property ! /// overrides that are to be applied. ! /// </summary> ! public IResource[] Locations ! { ! set { _locations = value; } ! } ! /// <summary> ! /// The configuration sections to look for within the .config files. ! /// </summary> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.Location"/> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.Locations"/> ! public string[] ConfigSections ! { ! get ! { ! if (_configSections == null ! || _configSections.Length == 0) ! { ! _configSections = new string[] {DefaultConfigSectionName}; ! } ! return _configSections; ! } ! set { _configSections = value; } ! } /// <summary> --- 32,207 ---- namespace Spring.Objects.Factory.Config { ! /// <summary> ! /// Allows for the configuration of individual object property values from ! /// a .NET .config file. ! /// </summary> ! /// <remarks> ! /// <p> ! /// Useful for custom .NET .config files targetted at system administrators ! /// that override object properties configured in the application context. ! /// </p> ! /// <p> ! /// Two concrete implementations are provided in the Spring.NET core library: ! /// <list type="bullet"> ! /// <item> ! /// <description> ! /// <see cref="Spring.Objects.Factory.Config.PropertyOverrideConfigurer"/> ! /// for <c><add key="placeholderKey" value="..."/></c> style ! /// overriding (pushing values from a .NET .config file into object ! /// definitions). ! /// </description> ! /// </item> ! /// <item> ! /// <description> ! /// <see cref="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer"/> ! /// for replacing "${...}" placeholders (pulling values from a .NET .config ! /// file into object definitions). ! /// </description> ! /// </item> ! /// </list> ! /// </p> ! /// <p> ! /// Please refer to the API documentation for the concrete implementations ! /// listed above for example usage. ! /// </p> ! /// </remarks> ! /// <author>Juergen Hoeller</author> ! /// <author>Simon White (.NET)</author> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyOverrideConfigurer"/> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer"/> ! /// <version>$Id$</version> [Serializable] public abstract class PropertyResourceConfigurer ! : IObjectFactoryPostProcessor, IOrdered ! { ! /// <summary> ! /// The default configuration section name to use if none is explictly supplied. ! /// </summary> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.ConfigSections"/> ! public const string DefaultConfigSectionName = "spring-config"; ! #region Fields ! private static readonly ILog _log = LogManager.GetLogger(typeof(PropertyResourceConfigurer)); ! private int _order = Int32.MaxValue; // default: same as non-Ordered ! private NameValueCollection _defaultProperties; ! private IResource[] _locations; ! private string[] _configSections; ! private bool _ignoreResourceNotFound = false; ! private bool _lastLocationOverrides = true; ! #endregion ! #region Constructor (s) / Destructor ! /// <summary> ! /// Creates a new instance of the ! /// <see cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer"/> ! /// class. ! /// </summary> ! /// <remarks> ! /// <p> ! /// This is an <see langword="abstract"/> class, and as such exposes no ! /// public constructors. ! /// </p> ! /// </remarks> ! protected PropertyResourceConfigurer() ! { ! } ! #endregion ! #region Properties ! /// <summary> ! /// The policy for resolving conflicting property overrides from ! /// several resources. ! /// </summary> ! /// <remarks> ! /// <p> ! /// When merging conflicting property overrides from several resources, ! /// should append an override with the same key be appended to the ! /// current value, or should the property override from the last resource ! /// processed override previous values? ! /// </p> ! /// <p> ! /// The default value is <see langword="true"/>; i.e. a property ! /// override from the last resource to be processed overrides previous ! /// values. ! /// </p> ! /// </remarks> ! /// <value> ! /// <see langword="true"/> if the property override from the last resource ! /// processed overrides previous values. ! /// </value> ! public bool LastLocationOverrides ! { ! set { _lastLocationOverrides = value; } ! } ! /// <summary> ! /// Return the order value of this object, where a higher value means greater in ! /// terms of sorting. ! /// </summary> ! /// <returns>The order value.</returns> ! /// <seealso cref="Spring.Core.IOrdered.Order"/> ! public int Order ! { ! get { return _order; } ! set { _order = value; } ! } ! /// <summary> ! /// The default properties to be applied. ! /// </summary> ! /// <remarks> ! /// <p> ! /// These are to be considered defaults, to be overridden by values ! /// loaded from other resources. ! /// </p> ! /// </remarks> ! public NameValueCollection Properties ! { ! get { return _defaultProperties; } ! set { _defaultProperties = value; } ! } ! /// <summary> ! /// The location of the .NET .config file that contains the property ! /// overrides that are to be applied. ! /// </summary> ! public IResource Location ! { ! set { _locations = new IResource[] {value}; } ! } ! /// <summary> ! /// The locations of the .NET .config files containing the property ! /// overrides that are to be applied. ! /// </summary> ! public IResource[] Locations ! { ! set { _locations = value; } ! } ! /// <summary> ! /// The configuration sections to look for within the .config files. ! /// </summary> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.Location"/> ! /// <seealso cref="Spring.Objects.Factory.Config.PropertyResourceConfigurer.Locations"/> ! public string[] ConfigSections ! { ! get ! { ! if (_configSections == null ! || _configSections.Length == 0) ! { ! _configSections = new string[] {DefaultConfigSectionName}; ! } ! return _configSections; ! } ! set { _configSections = value; } ! } /// <summary> *************** *** 223,390 **** } ! #endregion ! ! ! /// <summary> ! /// Modify the application context's internal object factory after its ! /// standard initialization. ! /// </summary> ! /// <param name="factory"> ! /// The object factory used by the application context. ! /// </param> ! /// <exception cref="Spring.Objects.ObjectsException"> ! /// In case of errors. ! /// </exception> ! /// <seealso cref="Spring.Objects.Factory.Config.IObjectFactoryPostProcessor.PostProcessObjectFactory(IConfigurableListableObjectFactory)"/> ! public void PostProcessObjectFactory(IConfigurableListableObjectFactory factory) ! { ! try ! { ! NameValueCollection properties = new NameValueCollection(); ! InitializeWithDefaultProperties(properties); ! LoadProperties(properties); ! ProcessProperties(factory, properties); ! } ! catch (Exception ex) ! { ! if (typeof (ObjectsException).IsInstanceOfType(ex)) ! { ! throw; ! } ! else ! { ! throw new ObjectsException( ! "Errored while postprocessing an object factory.", ex); ! } ! } ! } ! protected virtual void LoadProperties(NameValueCollection properties) ! { ! string[] configSections = ConfigSections; ! if (_locations != null) ! { ! ValidateConfigSections(configSections); ! bool usingMultipleConfigSections = configSections.Length > 1; ! int sectionNameIndex = 0; ! foreach (IResource resource in _locations) ! { ! #region Instrumentation ! if (_log.IsDebugEnabled) ! { ! _log.Debug(string.Format( ! CultureInfo.InvariantCulture, ! "Loading configuration from '{0}'.", resource)); ! } ! #endregion ! string sectionName = configSections[sectionNameIndex]; ! if (resource is ConfigSectionResource) ! { ! ConfigurationReader.PopulateFromAppConfig( ! properties, sectionName, _lastLocationOverrides); ! } ! else ! { ! if (resource.Exists) ! { ! ConfigurationReader.Read( ! resource, sectionName, properties, _lastLocationOverrides); ! } ! else ! { ! string errorMessage = "Could not load configuration from " + resource; ! if (_ignoreResourceNotFound) ! { ! #region Instrumentation ! if (_log.IsWarnEnabled) ! { ! _log.Warn(errorMessage); ! } ! #endregion ! } ! else ! { ! throw new ObjectInitializationException(errorMessage); ! } ! } ! } ! if (usingMultipleConfigSections) ! { ! ++sectionNameIndex; ! } ! } ! } ! else ! { ! foreach (string sectionName in configSections) ! { ! ConfigurationReader.PopulateFromAppConfig( ! properties, sectionName, _lastLocationOverrides); ! } ! } ! } ! /// <summary> ! /// Apply the given properties to the supplied ! /// <see cref="Spring.Objects.Factory.Config.IConfigurableListableObjectFactory"/>. ! /// </summary> ! /// <param name="factory"> ! /// The <see cref="Spring.Objects.Factory.Config.IConfigurableListableObjectFactory"/> ! /// used by the application context. ! /// </param> ! /// <param name="props">The properties to apply.</param> ! /// <exception cref="Spring.Objects.ObjectsException"> ! /// If an error occured. ! /// </exception> ! protected abstract void ProcessProperties( ! IConfigurableListableObjectFactory factory, ! NameValueCollection props); ! /// <summary> ! /// Validates the supplied <paramref name="configSections"/>. ! /// </summary> ! /// <remarks> ! /// <p> ! /// Basically, if external locations are specified, ensure that either ! /// one or a like number of config sections are also specified. ! /// </p> ! /// </remarks> ! /// <param name="configSections"> ! /// The <paramref name="configSections"/> to be validated. ! /// </param> ! private void ValidateConfigSections(string[] configSections) ! { ! if (_locations.Length != configSections.Length) ! { ! // if only one config section is specified for all locations that's cool... ! if (configSections.Length != 1) ! { ! throw new ObjectInitializationException( ! "Invalid number of config sections specified."); ! } ! } ! } ! /// <summary> ! /// Simply initializes the supplied <paramref name="properties"/> ! /// collection with this instances default <see cref="Properties"/> ! /// (if any). ! /// </summary> ! /// <param name="properties"> ! /// The collection to be so initialized. ! /// </param> ! private void InitializeWithDefaultProperties(NameValueCollection properties) ! { ! if (Properties != null) ! { ! properties.Add(Properties); ! } ! } ! } } \ No newline at end of file --- 223,393 ---- } ! #endregion ! /// <summary> ! /// Modify the application context's internal object factory after its ! /// standard initialization. ! /// </summary> ! /// <param name="factory"> ! /// The object factory used by the application context. ! /// </param> ! /// <exception cref="Spring.Objects.ObjectsException"> ! /// In case of errors. ! /// </exception> ! /// <seealso cref="Spring.Objects.Factory.Config.IObjectFactoryPostProcessor.PostProcessObjectFactory(IConfigurableListableObjectFactory)"/> ! public void PostProcessObjectFactory(IConfigurableListableObjectFactory factory) ! { ! try ! { ! NameValueCollection properties = new NameValueCollection(); ! InitializeWithDefaultProperties(properties); ! LoadProperties(properties); ! ProcessProperties(factory, properties); ! } ! catch (Exception ex) ! { ! if (typeof(ObjectsException).IsInstanceOfType(ex)) ! { ! throw; ! } ! else ! { ! throw new ObjectsException( ! "Errored while postprocessing an object factory.", ex); ! } ! } ! } ! /// <summary> ! /// Loads properties from the configuration sections ! /// specified in <see cref="ConfigSections"/> into <paramref name="properties"/>. ! /// </summary> ! /// <param name="properties">The <see cref="NameValueCollection"/> instance to be filled with properties.</param> ! protected virtual void LoadProperties(NameValueCollection properties) ! { ! string[] configSections = ConfigSections; ! if (_locations != null) ! { ! ValidateConfigSections(configSections); ! bool usingMultipleConfigSections = configSections.Length > 1; ! int sectionNameIndex = 0; ! foreach (IResource resource in _locations) ! { ! #region Instrumentation ! if (_log.IsDebugEnabled) ! { ! _log.Debug(string.Format( ! CultureInfo.InvariantCulture, ! "Loading configuration from '{0}'.", resource)); ! } ! #endregion ! string sectionName = configSections[sectionNameIndex]; ! if (resource is ConfigSectionResource) ! { ! ConfigurationReader.PopulateFromAppConfig( ! properties, sectionName, _lastLocationOverrides); ! } ! else ! { ! if (resource.Exists) ! { ! ConfigurationReader.Read( ! resource, sectionName, properties, _lastLocationOverrides); ! } ! else ! { ! string errorMessage = "Could not load configuration from " + resource; ! if (_ignoreResourceNotFound) ! { ! #region Instrumentation ! if (_log.IsWarnEnabled) ! { ! _log.Warn(errorMessage); ! } ! #endregion ! } ! else ! { ! throw new ObjectInitializationException(errorMessage); ! } ! } ! } ! if (usingMultipleConfigSections) ! { ! ++sectionNameIndex; ! } ! } ! } ! else ! { ! foreach (string sectionName in configSections) ! { ! ConfigurationReader.PopulateFromAppConfig( ! properties, sectionName, _lastLocationOverrides); ! } ! } ! } ! /// <summary> ! /// Apply the given properties to the supplied ! /// <see cref="Spring.Objects.Factory.Config.IConfigurableListableObjectFactory"/>. ! /// </summary> ! /// <param name="factory"> ! /// The <see cref="Spring.Objects.Factory.Config.IConfigurableListableObjectFactory"/> ! /// used by the application context. ! /// </param> ! /// <param name="props">The properties to apply.</param> ! /// <exception cref="Spring.Objects.ObjectsException"> ! /// If an error occured. ! /// </exception> ! protected abstract void ProcessProperties( ! IConfigurableListableObjectFactory factory, ! NameValueCollection props); ! /// <summary> ! /// Validates the supplied <paramref name="configSections"/>. ! /// </summary> ! /// <remarks> ! /// <p> ! /// Basically, if external locations are specified, ensure that either ! /// one or a like number of config sections are also specified. ! /// </p> ! /// </remarks> ! /// <param name="configSections"> ! /// The <paramref name="configSections"/> to be validated. ! /// </param> ! private void ValidateConfigSections(string[] configSections) ! { ! if (_locations.Length != configSections.Length) ! { ! // if only one config section is specified for all locations that's cool... ! if (configSections.Length != 1) ! { ! throw new ObjectInitializationException( ! "Invalid number of config sections specified."); ! } ! } ! } ! /// <summary> ! /// Simply initializes the supplied <paramref name="properties"/> ! /// collection with this instances default <see cref="Properties"/> ! /// (if any). ! /// </summary> ! /// <param name="properties"> ! /// The collection to be so initialized. ! /// </param> ! private void InitializeWithDefaultProperties(NameValueCollection properties) ! { ! if (Properties != null) ! { ! properties.Add(Properties); ! } ! } ! } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2007-08-27 14:49:50
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Xml In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv6039/Xml Modified Files: DefaultObjectDefinitionDocumentReader.cs Log Message: more xml doc comments Index: DefaultObjectDefinitionDocumentReader.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Xml/DefaultObjectDefinitionDocumentReader.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefaultObjectDefinitionDocumentReader.cs 27 Aug 2007 13:57:43 -0000 1.8 --- DefaultObjectDefinitionDocumentReader.cs 27 Aug 2007 14:49:43 -0000 1.9 *************** *** 145,148 **** --- 145,154 ---- } + /// <summary> + /// Parses object definitions starting at the given <see cref="XmlElement"/> + /// using the passed <see cref="ObjectDefinitionParserHelper"/>. + /// </summary> + /// <param name="root">The root element to start parsing from.</param> + /// <param name="helper">The <see cref="ObjectDefinitionParserHelper"/> instance to use.</param> protected virtual void ParseObjectDefinitions(XmlElement root, ObjectDefinitionParserHelper helper) { |
From: Erich E. <oak...@us...> - 2007-08-27 14:43:52
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeConversion In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27200/Core/TypeConversion Modified Files: ResourceManagerConverter.cs Log Message: fixed SPRNET-679 Index: ResourceManagerConverter.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Core/TypeConversion/ResourceManagerConverter.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResourceManagerConverter.cs 3 Aug 2007 06:08:50 -0000 1.2 --- ResourceManagerConverter.cs 25 Aug 2007 10:53:25 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- public class ResourceManagerConverter : TypeConverter { + public static readonly string APP_GLOBALRESOURCES_ASSEMBLYNAME = "App_GlobalResources"; + #region Constructor (s) / Destructor /// <summary> *************** *** 99,102 **** --- 101,105 ---- /// if successful. /// </returns> + /// <exception cref="ArgumentException">If the specified <paramref name="value"/> does not denote a valid resource</exception> public override object ConvertFrom ( ITypeDescriptorContext context, *************** *** 122,131 **** } #if NET_2_0 ! if (assemblyName == "App_GlobalResources") { ! Type globalResourcesType = TypeResolutionUtils.ResolveType(resourceName); ! PropertyInfo resourceManagerProperty = ! globalResourcesType.GetProperty("ResourceManager", BindingFlags.Public | BindingFlags.Static); ! return (ResourceManager) resourceManagerProperty.GetValue(globalResourcesType, null); } Assembly ass = Assembly.LoadWithPartialName(assemblyName); --- 125,140 ---- } #if NET_2_0 ! if (assemblyName == APP_GLOBALRESOURCES_ASSEMBLYNAME) { ! try ! { ! Type globalResourcesType = TypeResolutionUtils.ResolveType(resourceName); ! PropertyInfo resourceManagerProperty = globalResourcesType.GetProperty("ResourceManager", BindingFlags.Public | BindingFlags.Static); ! return (ResourceManager) resourceManagerProperty.GetValue(globalResourcesType, null); ! } ! catch (TypeLoadException ex) ! { ! throw new ArgumentException("Could not load resources '{0}'", resourceName, ex); ! } } Assembly ass = Assembly.LoadWithPartialName(assemblyName); |
From: Erich E. <oak...@us...> - 2007-08-27 13:57:54
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9622/Support Modified Files: AbstractObjectDefinition.cs Log Message: added xml doc comments Index: AbstractObjectDefinition.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** AbstractObjectDefinition.cs 22 Aug 2007 08:49:39 -0000 1.30 --- AbstractObjectDefinition.cs 27 Aug 2007 13:57:43 -0000 1.31 *************** *** 25,29 **** using System.Reflection; using System.Text; - using Spring.Core; using Spring.Core.TypeResolution; --- 25,28 ---- *************** *** 35,67 **** namespace Spring.Objects.Factory.Support { [...1301 lines suppressed...] ! private EventValues eventHandlerValues = new EventValues(); ! private MethodOverrides methodOverrides = new MethodOverrides(); ! private string resourceDescription = string.Empty; ! private bool isSingleton = true; ! private bool isPrototype = false; ! private bool isLazyInit = false; ! private bool isAbstract = false; ! private object objectType; ! private AutoWiringMode autowireMode = AutoWiringMode.No; ! private DependencyCheckingMode dependencyCheck = DependencyCheckingMode.None; ! private string[] dependsOn; ! private string initMethodName = string.Empty; ! private string destroyMethodName = string.Empty; ! private string factoryMethodName = string.Empty; ! private string factoryObjectName = string.Empty; ! #endregion ! } } \ No newline at end of file |