springnet-commits Mailing List for Spring Framework .NET (Page 31)
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
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29810/Data/Core Added Files: TxScopeTransactionManagerIntegrationTests.cs TxScopeTransactionManagerTests.cs TxScopeTransactionManagerTypeMockTests.cs Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference --- NEW FILE: TxScopeTransactionManagerTests.cs --- #if NET_2_0 #region License /* * Copyright © 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion #region Imports using System; using System.Transactions; using NUnit.Framework; using Rhino.Mocks; using Spring.Data.Support; using Spring.Transaction; using Spring.Transaction.Support; #endregion namespace Spring.Data.Core { /// <summary> /// This calss contains tests for /// </summary> /// <author>Mark Pollack</author> /// <version>$Id: TxScopeTransactionManagerTests.cs,v 1.1 2007/11/30 18:38:59 markpollack Exp $</version> [TestFixture] public class TxScopeTransactionManagerTests { private MockRepository mocks; [SetUp] public void Setup() { mocks = new MockRepository(); } [Test] public void TransactionCommit() { ITransactionScopeAdapter txAdapter = (ITransactionScopeAdapter) mocks.CreateMock(typeof(ITransactionScopeAdapter)); using (mocks.Ordered()) { TransactionOptions txOptions = new TransactionOptions(); txOptions.IsolationLevel = IsolationLevel.Unspecified; txAdapter.CreateTransactionScope(TransactionScopeOption.Required, txOptions, EnterpriseServicesInteropOption.None); Expect.Call(txAdapter.RollbackOnly).Return(false); txAdapter.Complete(); txAdapter.Dispose(); } mocks.ReplayAll(); IPlatformTransactionManager tm = new TxScopeTransactionManager(txAdapter); TransactionTemplate tt = new TransactionTemplate(tm); tt.Execute(delegate(ITransactionStatus status) { Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); return null; }); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); mocks.VerifyAll(); } [Test] public void TransactionRollback() { ITransactionScopeAdapter txAdapter = (ITransactionScopeAdapter)mocks.CreateMock(typeof(ITransactionScopeAdapter)); using (mocks.Ordered()) { TransactionOptions txOptions = new TransactionOptions(); txOptions.IsolationLevel = IsolationLevel.Unspecified; txAdapter.CreateTransactionScope(TransactionScopeOption.Required, txOptions, EnterpriseServicesInteropOption.None); txAdapter.Dispose(); } mocks.ReplayAll(); IPlatformTransactionManager tm = new TxScopeTransactionManager(txAdapter); TransactionTemplate tt = new TransactionTemplate(tm); Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); Exception ex = new ArgumentException("test exception"); try { tt.Execute(delegate(ITransactionStatus status) { Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); if (ex != null) throw ex; return null; }); Assert.Fail("Should have thrown exception"); } catch (ArgumentException e) { Assert.AreEqual(ex, e); } Assert.IsTrue(!TransactionSynchronizationManager.SynchronizationActive, "Synchronizations not active"); mocks.VerifyAll(); } [Test] public void PropagationRequiresNewWithExistingTransaction() { ITransactionScopeAdapter txAdapter = (ITransactionScopeAdapter)mocks.CreateMock(typeof(ITransactionScopeAdapter)); using (mocks.Ordered()) { TransactionOptions txOptions = new TransactionOptions(); txOptions.IsolationLevel = IsolationLevel.Unspecified; txAdapter.CreateTransactionScope(TransactionScopeOption.RequiresNew, txOptions, EnterpriseServicesInteropOption.None); //inner tx actions txAdapter.CreateTransactionScope(TransactionScopeOption.RequiresNew, txOptions, EnterpriseServicesInteropOption.None); txAdapter.Dispose(); //end inner tx actions Expect.Call(txAdapter.RollbackOnly).Return(false); txAdapter.Complete(); txAdapter.Dispose(); } mocks.ReplayAll(); IPlatformTransactionManager tm = new TxScopeTransactionManager(txAdapter); TransactionTemplate tt = new TransactionTemplate(tm); tt.PropagationBehavior = TransactionPropagation.RequiresNew; tt.Execute(delegate(ITransactionStatus status) { Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive, "Synchronization active"); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.IsTrue(TransactionSynchronizationManager.ActualTransactionActive); tt.Execute(delegate(ITransactionStatus status2) { Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive, "Synchronization active"); Assert.IsTrue(status2.IsNewTransaction, "Is new transaction"); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.IsTrue(TransactionSynchronizationManager.ActualTransactionActive); status2.RollbackOnly = true; return null; }); Assert.IsTrue(status.IsNewTransaction, "Is new transaction"); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.IsTrue(TransactionSynchronizationManager.ActualTransactionActive); return null; }); mocks.VerifyAll(); } } } #endif --- NEW FILE: TxScopeTransactionManagerTypeMockTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TxScopeTransactionManagerIntegrationTests.cs --- #if NET_2_0 #region License /* * Copyright © 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion #region Imports using System.Reflection; using NUnit.Framework; using Rhino.Mocks; using Spring.Data.Core; using Spring.Objects; using Spring.Transaction; using Spring.Transaction.Support; #endregion namespace Spring.Data.Core { /// <summary> /// This class contains tests for TxScopeTransactionManager and will directly a real TransactionScope object /// but does not access any database /// </summary> /// <author>Mark Pollack</author> /// <version>$Id: TxScopeTransactionManagerIntegrationTests.cs,v 1.1 2007/11/30 18:38:59 markpollack Exp $</version> [TestFixture] public class TxScopeTransactionManagerIntegrationTests { private MockRepository mocks; [SetUp] public void Setup() { mocks = new MockRepository(); } [TearDown] public void TearDown() { Assert.IsTrue(TransactionSynchronizationManager.ResourceDictionary.Count == 0); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); Assert.IsNull(TransactionSynchronizationManager.CurrentTransactionName); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.AreEqual(System.Data.IsolationLevel.Unspecified, TransactionSynchronizationManager.CurrentTransactionIsolationLevel); Assert.IsFalse(TransactionSynchronizationManager.ActualTransactionActive); } [Test] public void Commit() { TxScopeTransactionManager tm = new TxScopeTransactionManager(); TransactionTemplate tt = new TransactionTemplate(tm); //tt.Name = "txName"; Assert.AreEqual(TransactionSynchronizationState.Always, tm.TransactionSynchronization); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); Assert.IsNull(TransactionSynchronizationManager.CurrentTransactionName); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); tt.Execute(CommitTxDelegate); Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); Assert.IsNull(TransactionSynchronizationManager.CurrentTransactionName); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); } public object CommitTxDelegate(ITransactionStatus status) { Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); return null; } [Test] public void TransactionInformation() { TxScopeTransactionManager tm = new TxScopeTransactionManager(); TransactionTemplate tt = new TransactionTemplate(tm); tt.TransactionIsolationLevel = System.Data.IsolationLevel.ReadUncommitted; tt.Execute(TransactionInformationTxDelegate); } public object TransactionInformationTxDelegate(ITransactionStatus status) { Assert.AreEqual(System.Transactions.IsolationLevel.ReadUncommitted, System.Transactions.Transaction.Current.IsolationLevel); Assert.AreEqual(System.Data.IsolationLevel.ReadUncommitted, TransactionSynchronizationManager.CurrentTransactionIsolationLevel); return null; } [Test] public void Rollback() { ITransactionSynchronization sync = (ITransactionSynchronization) mocks.DynamicMock(typeof (ITransactionSynchronization)); sync.BeforeCompletion(); LastCall.On(sync).Repeat.Once(); sync.AfterCompletion(TransactionSynchronizationStatus.Rolledback); LastCall.On(sync).Repeat.Once(); mocks.ReplayAll(); TxScopeTransactionManager tm = new TxScopeTransactionManager(); TransactionTemplate tt = new TransactionTemplate(tm); tt.TransactionTimeout = 10; tt.Name = "txName"; Assert.IsFalse(TransactionSynchronizationManager.SynchronizationActive); Assert.IsNull(TransactionSynchronizationManager.CurrentTransactionName); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); tt.Execute(delegate (ITransactionStatus status) { Assert.IsTrue(TransactionSynchronizationManager.SynchronizationActive); TransactionSynchronizationManager.RegisterSynchronization(sync); Assert.AreEqual("txName", TransactionSynchronizationManager.CurrentTransactionName); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); status.RollbackOnly = true; return null; } ); mocks.VerifyAll(); } } } #endif |
From: Mark P. <mar...@us...> - 2007-11-30 18:40:29
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29810 Modified Files: Spring.Data.Tests.2005.csproj Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference Index: Spring.Data.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2005.csproj,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Spring.Data.Tests.2005.csproj 8 Oct 2007 22:05:34 -0000 1.29 --- Spring.Data.Tests.2005.csproj 30 Nov 2007 18:38:59 -0000 1.30 *************** *** 138,142 **** <Compile Include="Data\TestCoord.cs" /> <Compile Include="Data\TestObjectMgr.cs" /> - <Compile Include="Data\TxScopeTransactionManagerTests.cs" /> <Compile Include="Support\ErrorCodeExceptionTranslatorTests.cs" /> <Compile Include="Support\TestDbProvider.cs" /> --- 138,141 ---- *************** *** 170,179 **** </ItemGroup> <ItemGroup> <Compile Include="Transaction\Interceptor\AbstractTransactionAspectTests.cs" /> <Compile Include="Transaction\Interceptor\TransactionInterceptorTests.cs" /> </ItemGroup> - <ItemGroup> - <Folder Include="Data\Core\" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> --- 169,177 ---- </ItemGroup> <ItemGroup> + <Compile Include="Data\Core\TxScopeTransactionManagerIntegrationTests.cs" /> + <Compile Include="Data\Core\TxScopeTransactionManagerTests.cs" /> <Compile Include="Transaction\Interceptor\AbstractTransactionAspectTests.cs" /> <Compile Include="Transaction\Interceptor\TransactionInterceptorTests.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> |
From: Mark P. <mar...@us...> - 2007-11-30 18:40:16
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29810/Data Removed Files: TxScopeTransactionManagerTests.cs Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference --- TxScopeTransactionManagerTests.cs DELETED --- |
From: Mark P. <mar...@us...> - 2007-11-30 18:39:59
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29774 Modified Files: Spring.Data.2005.csproj Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference Index: Spring.Data.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Spring.Data.2005.csproj,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Spring.Data.2005.csproj 10 Oct 2007 20:59:23 -0000 1.55 --- Spring.Data.2005.csproj 30 Nov 2007 18:38:46 -0000 1.56 *************** *** 198,204 **** --- 198,206 ---- <Compile Include="Data\Support\ConnectionTxPair.cs" /> <Compile Include="Data\Support\ConnectionUtils.cs" /> + <Compile Include="Data\Support\DefaultTransactionScopeAdapter.cs" /> <Compile Include="Data\Support\ErrorCodeExceptionTranslator.cs" /> <Compile Include="Data\Support\FallbackExceptionTranslator.cs" /> <Compile Include="Data\Support\IAdoExceptionTranslator.cs" /> + <Compile Include="Data\Support\ITransactionScopeAdapter.cs" /> <Compile Include="Data\Support\NamedResultSetProcessor.cs" /> <Compile Include="Data\Support\NullMappingDataReader.cs" /> |
From: Mark P. <mar...@us...> - 2007-11-30 18:39:59
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29799 Modified Files: AbstractPlatformTransactionManager.cs Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference Index: AbstractPlatformTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Transaction/Support/AbstractPlatformTransactionManager.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** AbstractPlatformTransactionManager.cs 12 Nov 2007 19:58:06 -0000 1.25 --- AbstractPlatformTransactionManager.cs 30 Nov 2007 18:38:54 -0000 1.26 *************** *** 125,128 **** --- 125,129 ---- private bool _nestedTransactionsAllowed; private bool _rollbackOnCommitFailure; + private bool _failEarlyOnGlobalRollbackOnly; private int _defaultTimeout = DefaultTransactionDefinition.TIMEOUT_DEFAULT; *************** *** 189,192 **** --- 190,212 ---- /// <summary> + /// Gets or sets a value indicating whether to fail early in case of the transaction being + /// globally marked as rollback-only. + /// </summary> + /// <remarks> + /// Default is "false", only causing an UnexpectedRollbackException at the + /// outermost transaction boundary. Switch this flag on to cause an + /// UnexpectedRollbackException as early as the global rollback-only marker + /// has been first detected, even from within an inner transaction boundary. + /// </remarks> + /// <value> + /// <c>true</c> if fail early on global rollback; otherwise, <c>false</c>. + /// </value> + public bool FailEarlyOnGlobalRollbackOnly + { + get { return _failEarlyOnGlobalRollbackOnly; } + set { _failEarlyOnGlobalRollbackOnly = value; } + } + + /// <summary> /// Gets or sets the default timeout that this transaction manager should apply if there /// is no timeout specified at the transaction level, in seconds. *************** *** 641,645 **** return; } ! if (defaultStatus.GlobalRollbackOnly) { if (defaultStatus.Debug) --- 661,665 ---- return; } ! if ( !ShouldCommitOnGlobalRollbackOnly && defaultStatus.GlobalRollbackOnly) { if (defaultStatus.Debug) *************** *** 650,654 **** // Throw UnexpectedRollbackException only at outermost transaction boundary // or if explicitly asked to. ! if (defaultStatus.IsNewTransaction) { throw new UnexpectedRollbackException( --- 670,674 ---- // Throw UnexpectedRollbackException only at outermost transaction boundary // or if explicitly asked to. ! if (defaultStatus.IsNewTransaction || FailEarlyOnGlobalRollbackOnly) { throw new UnexpectedRollbackException( *************** *** 661,664 **** --- 681,689 ---- } + protected virtual bool ShouldCommitOnGlobalRollbackOnly + { + get { return false; } + } + private void ProcessCommit(DefaultTransactionStatus status) { *************** *** 672,676 **** beforeCompletionInvoked = true; bool globalRollbackOnly = false; ! if (status.IsNewTransaction) { globalRollbackOnly = status.GlobalRollbackOnly; --- 697,701 ---- beforeCompletionInvoked = true; bool globalRollbackOnly = false; ! if (status.IsNewTransaction || FailEarlyOnGlobalRollbackOnly) { globalRollbackOnly = status.GlobalRollbackOnly; |
From: Mark P. <mar...@us...> - 2007-11-30 18:39:47
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29774/Data/Support Added Files: DefaultTransactionScopeAdapter.cs ITransactionScopeAdapter.cs Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference --- NEW FILE: DefaultTransactionScopeAdapter.cs --- #if NET_2_0 #region License /* * Copyright 2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion using System.Transactions; namespace Spring.Data.Support { /// <summary> /// Uses <see cref="TransactionScope"/> and System.Transactions.Transaction.Current to provide /// necessary state and operations to TxScopeTransactionManager. /// </summary> /// <author>Mark Pollack (.NET)</author> /// <version>$Id: DefaultTransactionScopeAdapter.cs,v 1.1 2007/11/30 18:38:47 markpollack Exp $</version> public class DefaultTransactionScopeAdapter : ITransactionScopeAdapter { private TransactionScope txScope; /// <summary> /// Call Complete() on the TransactionScope object created by this instance. /// </summary> public void Complete() { txScope.Complete(); } /// <summary> /// Call Disponse() on the TransactionScope object created by this instance. /// </summary> public void Dispose() { txScope.Dispose(); } /// <summary> /// Gets a value indicating whether there is a new transaction or an existing transaction. /// </summary> /// <value> /// <c>true</c> if this instance is existing transaction; otherwise, <c>false</c>. /// </value> public bool IsExistingTransaction { get { if (System.Transactions.Transaction.Current != null) { return true; } else { return false; } } } /// <summary> /// Gets a value indicating whether rollback only has been called (i.e. Rollback() on the /// Transaction object) and therefore voting that the transaction will be aborted. /// </summary> /// <value><c>true</c> if rollback only; otherwise, <c>false</c>.</value> public bool RollbackOnly { get { if (System.Transactions.Transaction.Current != null && System.Transactions.Transaction.Current.TransactionInformation != null && System.Transactions.Transaction.Current.TransactionInformation.Status == TransactionStatus.Aborted) { return true; } else { return false; } } } /// <summary> /// Creates the transaction scope. /// </summary> /// <param name="txScopeOption">The tx scope option.</param> /// <param name="txOptions">The tx options.</param> /// <param name="interopOption">The interop option.</param> public void CreateTransactionScope(TransactionScopeOption txScopeOption, TransactionOptions txOptions, EnterpriseServicesInteropOption interopOption) { txScope = new TransactionScope(txScopeOption, txOptions, interopOption); } } } #endif --- NEW FILE: ITransactionScopeAdapter.cs --- #if NET_2_0 #region License /* * Copyright 2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion using System.Transactions; namespace Spring.Data.Support { /// <summary> /// Provides the necessary transactional state and operations for TxScopeTransactionManager to /// work with TransactionScope and Transaction.Current. /// </summary> /// <remarks>Introduced for purposes of unit testing.</remarks> /// <author>Mark Pollack (.NET)</author> /// <version>$Id: ITransactionScopeAdapter.cs,v 1.1 2007/11/30 18:38:47 markpollack Exp $</version> public interface ITransactionScopeAdapter { /// <summary> /// Creates the transaction scope. /// </summary> /// <param name="txScopeOption">The tx scope option.</param> /// <param name="txOptions">The tx options.</param> /// <param name="interopOption">The interop option.</param> void CreateTransactionScope(TransactionScopeOption txScopeOption, TransactionOptions txOptions, EnterpriseServicesInteropOption interopOption); /// <summary> /// Call Complete() on the TransactionScope object created by this instance. /// </summary> void Complete(); /// <summary> /// Call Disponse() on the TransactionScope object created by this instance. /// </summary> void Dispose(); /// <summary> /// Gets a value indicating whether there is a new transaction or an existing transaction. /// </summary> /// <value> /// <c>true</c> if this instance is existing transaction; otherwise, <c>false</c>. /// </value> bool IsExistingTransaction { get; } /// <summary> /// Gets a value indicating whether rollback only has been called (i.e. Rollback() on the /// Transaction object) and therefore voting that the transaction will be aborted. /// </summary> /// <value><c>true</c> if rollback only; otherwise, <c>false</c>.</value> bool RollbackOnly { get; } } } #endif |
From: Mark P. <mar...@us...> - 2007-11-30 18:39:47
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29774/Data/Core Modified Files: TxScopeTransactionManager.cs Log Message: SPRNET-761 - Add unit tests for TxScopePlatformTransactionManager Introduce ITransactionScopeAdapter to make it testable with Mocks added TypeMock based unit test that is not used but nice to have for future reference Index: TxScopeTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TxScopeTransactionManager.cs 30 Nov 2007 07:55:29 -0000 1.3 --- TxScopeTransactionManager.cs 30 Nov 2007 18:38:46 -0000 1.4 *************** *** 4,8 **** /* ! * Copyright 2004 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 4,8 ---- /* ! * Copyright 2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 23,26 **** --- 23,27 ---- using System; using System.Transactions; + using Spring.Data.Support; using Spring.Objects.Factory; using Spring.Transaction; *************** *** 36,42 **** --- 37,65 ---- public class TxScopeTransactionManager : AbstractPlatformTransactionManager, IInitializingObject { + private ITransactionScopeAdapter txAdapter; + + /// <summary> + /// Initializes a new instance of the <see cref="TxScopeTransactionManager"/> class. + /// </summary> + public TxScopeTransactionManager() + { + + } + /// <summary> + /// Initializes a new instance of the <see cref="TxScopeTransactionManager"/> class. + /// </summary> + /// <remarks>This is indented only for unit testing purposes and should not be + /// called by application code.</remarks> + /// <param name="txAdapter">The tx adapter.</param> + public TxScopeTransactionManager(ITransactionScopeAdapter txAdapter) + { + this.txAdapter = txAdapter; + } #region IInitializingObject Members + /// <summary> + /// No-op initialization + /// </summary> public void AfterPropertiesSet() { *************** *** 55,59 **** PromotableTxScopeTransactionObject txObject = (PromotableTxScopeTransactionObject)transaction; ! return txObject.IsExistingTransaction(); } --- 78,82 ---- PromotableTxScopeTransactionObject txObject = (PromotableTxScopeTransactionObject)transaction; ! return txObject.TxScopeAdapter.IsExistingTransaction; } *************** *** 74,81 **** protected override object DoSuspend(object transaction) { ! // Passing the current TransactionScope as the 'suspended resource, even though DoResume has no need to operate // on this object as it is handled internally inside TransactionScope. PromotableTxScopeTransactionObject txMgrStateObject = (PromotableTxScopeTransactionObject) transaction; ! return txMgrStateObject.TransactionScope; } --- 97,104 ---- protected override object DoSuspend(object transaction) { ! // Passing the current TxScopeAdapter as the 'suspended resource, even though DoResume has no need to operate // on this object as it is handled internally inside TransactionScope. PromotableTxScopeTransactionObject txMgrStateObject = (PromotableTxScopeTransactionObject) transaction; ! return txMgrStateObject.TxScopeAdapter; } *************** *** 90,95 **** try { ! txObject.TransactionScope.Complete(); ! txObject.TransactionScope.Dispose(); } catch (TransactionAbortedException ex) --- 113,118 ---- try { ! txObject.TxScopeAdapter.Complete(); ! txObject.TxScopeAdapter.Dispose(); } catch (TransactionAbortedException ex) *************** *** 114,118 **** try { ! txObject.TransactionScope.Dispose(); } catch (Exception e) --- 137,142 ---- try { ! ! txObject.TxScopeAdapter.Dispose(); } catch (Exception e) *************** *** 138,142 **** } ! private void DoTxScopeBegin(PromotableTxScopeTransactionObject transaction, --- 162,169 ---- } ! protected override bool ShouldCommitOnGlobalRollbackOnly ! { ! get { return true; } ! } private void DoTxScopeBegin(PromotableTxScopeTransactionObject transaction, *************** *** 146,151 **** TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); TransactionOptions txOptions = CreateTransactionOptions(definition); ! TransactionScope txScope = new TransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! transaction.TransactionScope = txScope; } --- 173,189 ---- TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); TransactionOptions txOptions = CreateTransactionOptions(definition); ! ! if (txAdapter != null) ! { ! txAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! transaction.TxScopeAdapter = txAdapter; ! } ! else ! { ! //TransactionScope txScope = new TransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! //transaction.TxScopeAdapter.TransactionScope = txScope; ! transaction.TxScopeAdapter.CreateTransactionScope(txScopeOption, txOptions, definition.EnterpriseServicesInteropOption); ! } ! } *************** *** 205,250 **** } public class PromotableTxScopeTransactionObject : ISmartTransactionObject { ! private TransactionScope txScope; ! public TransactionScope TransactionScope { ! get {return txScope;} ! set {txScope = value;} } ! public bool RollbackOnly { ! get { ! if (System.Transactions.Transaction.Current != null && ! System.Transactions.Transaction.Current.TransactionInformation != null && ! System.Transactions.Transaction.Current.TransactionInformation.Status == TransactionStatus.Aborted) ! { ! return true; ! } ! else ! { ! return false; ! } ! } } /// <summary> ! /// Determines whether a current transaction exists. /// </summary> ! /// <returns> ! /// <c>true</c> if a current transaction exists; otherwise, <c>false</c>. ! /// </returns> ! public bool IsExistingTransaction() { ! if (System.Transactions.Transaction.Current != null) ! { ! return true; ! } ! else ! { ! return false; ! } } } --- 243,285 ---- } + /// <summary> + /// The transaction resource object that encapsulates the state and functionality + /// contained in TransactionScope and Transaction.Current via the ITransactionScopeAdapter + /// property. + /// </summary> public class PromotableTxScopeTransactionObject : ISmartTransactionObject { ! private ITransactionScopeAdapter txScopeAdapter; ! /// <summary> ! /// Initializes a new instance of the <see cref="PromotableTxScopeTransactionObject"/> class. ! /// Will create an instance of <see cref="DefaultTransactionScopeAdapter"/>. ! /// </summary> ! public PromotableTxScopeTransactionObject() { ! txScopeAdapter = new DefaultTransactionScopeAdapter(); } ! /// <summary> ! /// Gets or sets the transaction scope adapter. ! /// </summary> ! /// <value>The transaction scope adapter.</value> ! public ITransactionScopeAdapter TxScopeAdapter { ! get { return txScopeAdapter; } ! set { txScopeAdapter = value; } } + /// <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 bool RollbackOnly { ! get { ! return txScopeAdapter.RollbackOnly; ! } } } |
From: Mark P. <mar...@us...> - 2007-11-30 18:02:48
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15665/Core Log Message: Directory /cvsroot/springnet/Spring.Net/test/Spring/Spring.Data.Tests/Data/Core added to the repository |
From: Mark P. <mar...@us...> - 2007-11-30 07:55:33
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28501 Modified Files: TxScopeTransactionManager.cs Log Message: Fix use of Nested Transactions in TxScopeTransactionManager. Index: TxScopeTransactionManager.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TxScopeTransactionManager.cs 8 Aug 2007 20:59:44 -0000 1.2 --- TxScopeTransactionManager.cs 30 Nov 2007 07:55:29 -0000 1.3 *************** *** 32,35 **** --- 32,37 ---- /// TransactionManager that uses TransactionScope provided by System.Transactions. /// </summary> + /// <author>Mark Pollack (.NET)</author> + /// <version>$Id$</version> public class TxScopeTransactionManager : AbstractPlatformTransactionManager, IInitializingObject { *************** *** 39,43 **** public void AfterPropertiesSet() { ! // Decide what should be requried for more advanced configurations. } --- 41,45 ---- public void AfterPropertiesSet() { ! // placeholder for more advanced configurations. } *************** *** 64,75 **** DoTxScopeBegin(txObject, definition); } - // TODO - may want to catch some exceptions here to map into DAO - // exception hierarchy. catch (Exception e) { ! throw new Spring.Transaction.CannotCreateTransactionException("Promotable Transaction Scope failure on begin", e); } } protected override void DoCommit(DefaultTransactionStatus status) { --- 66,87 ---- DoTxScopeBegin(txObject, definition); } catch (Exception e) { ! throw new CannotCreateTransactionException("Transaction Scope failure on begin", e); } } + protected override object DoSuspend(object transaction) + { + // Passing the current TransactionScope as the 'suspended resource, even though DoResume has no need to operate + // on this object as it is handled internally inside TransactionScope. + PromotableTxScopeTransactionObject txMgrStateObject = (PromotableTxScopeTransactionObject) transaction; + return txMgrStateObject.TransactionScope; + } + + protected override void DoResume(object transaction, object suspendedResources) + { + } + protected override void DoCommit(DefaultTransactionStatus status) { *************** *** 81,88 **** txObject.TransactionScope.Dispose(); } ! catch (Exception e) { ! //TODO provide more accurate exception mappings. ! throw new Spring.Transaction.TransactionSystemException("Failure on Promotable Transaction Scope Commit", e); } } --- 93,107 ---- txObject.TransactionScope.Dispose(); } ! catch (TransactionAbortedException ex) { ! throw new UnexpectedRollbackException("Transaction unexpectedly rolled back (maybe due to a timeout)", ex); ! } ! catch (TransactionInDoubtException ex) ! { ! throw new HeuristicCompletionException(TransactionOutcomeState.Unknown, ex); ! } ! catch (Exception ex) ! { ! throw new TransactionSystemException("Failure on Transaction Scope Commit", ex); } } *************** *** 99,107 **** catch (Exception e) { ! throw new Spring.Transaction.TransactionSystemException("Failure on Promotable Transaction Scope rollback.", e); } } private void DoTxScopeBegin(PromotableTxScopeTransactionObject transaction, Spring.Transaction.ITransactionDefinition definition) --- 118,143 ---- catch (Exception e) { ! throw new Spring.Transaction.TransactionSystemException("Failure on Transaction Scope rollback.", e); } } + protected override void DoSetRollbackOnly(DefaultTransactionStatus status) + { + if (status.Debug) + { + log.Debug("Setting transaction rollback-only"); + } + try + { + System.Transactions.Transaction.Current.Rollback(); + } catch (Exception ex) + { + throw new TransactionSystemException("Failure on System.Transactions.Transaction.Current.Rollback", ex); + } + } + + + private void DoTxScopeBegin(PromotableTxScopeTransactionObject transaction, Spring.Transaction.ITransactionDefinition definition) *************** *** 169,173 **** } ! public class PromotableTxScopeTransactionObject { private TransactionScope txScope; --- 205,209 ---- } ! public class PromotableTxScopeTransactionObject : ISmartTransactionObject { private TransactionScope txScope; *************** *** 179,182 **** --- 215,234 ---- } + public bool RollbackOnly + { + get { + if (System.Transactions.Transaction.Current != null && + System.Transactions.Transaction.Current.TransactionInformation != null && + System.Transactions.Transaction.Current.TransactionInformation.Status == TransactionStatus.Aborted) + { + return true; + } + else + { + return false; + } + } + } + /// <summary> /// Determines whether a current transaction exists. |
From: Bruno B. <bb...@us...> - 2007-11-29 13:13:19
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28957 Modified Files: WebServiceProxyFactory.cs Log Message: WebServiceProxyFactory support for SoapHeaderAttribute [SPRNET-784] Index: WebServiceProxyFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** WebServiceProxyFactory.cs 13 Nov 2007 03:17:49 -0000 1.26 --- WebServiceProxyFactory.cs 29 Nov 2007 13:13:14 -0000 1.27 *************** *** 437,440 **** --- 437,442 ---- #region Fields + private ArrayList soapHeaderFieldNames; + // Binding/Type related private IResource serviceUri; *************** *** 466,469 **** --- 468,472 ---- { this.serviceUri = serviceUri; + this.soapHeaderFieldNames = new ArrayList(); Name = "SoapHttpClientProxy"; *************** *** 505,508 **** --- 508,517 ---- } + // add SoapHeader public fields + foreach (string fieldName in soapHeaderFieldNames) + { + typeBuilder.DefineField(fieldName, typeof(SoapHeader), FieldAttributes.Public); + } + return typeBuilder.CreateType(); } *************** *** 633,636 **** --- 642,653 ---- IList attrs = base.GetMethodAttributes(method); + // SoapHeaderAttribute (Only SoapHeaders with Direction=SoapHeaderDirection.In are supported) + foreach (SoapHeaderBinding soapHeaderBinding in operationBinding.Input.Extensions.FindAll(typeof(SoapHeaderBinding))) + { + soapHeaderFieldNames.Add(soapHeaderBinding.Part); + attrs.Add(CreateSoapHeaderAttribute(soapHeaderBinding.Part, SoapHeaderDirection.In)); + } + + // SoapMethodAttribute attrs.Add(CreateSoapMethodAttribute( operation, operationBinding, soapOperationBinding, inputMembersMapping, outputMembersMapping)); *************** *** 858,861 **** --- 875,893 ---- /// <summary> + /// Creates a <see cref="SoapHeaderAttribute"/> that should be applied to proxy method. + /// </summary> + private static CustomAttributeBuilder CreateSoapHeaderAttribute( + string memberName, SoapHeaderDirection direction) + { + CustomAttributeBuilderBuilder cabb = + new CustomAttributeBuilderBuilder(typeof(SoapHeaderAttribute)); + + cabb.AddContructorArgument(memberName); + cabb.AddPropertyValue("Direction", direction); + + return cabb.Build(); + } + + /// <summary> /// Creates a <see cref="SoapDocumentMethodAttribute"/> or a <see cref="SoapRpcMethodAttribute"/> /// that should be applied to proxy method. |
From: Erich E. <oak...@us...> - 2007-11-28 23:49:17
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5897 Removed Files: PageTestObject.cs Log Message: forgot to delete obsolete file --- PageTestObject.cs DELETED --- |
From: Erich E. <oak...@us...> - 2007-11-28 23:40:28
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2177 Modified Files: PageTests.cs Log Message: added test for http://opensource.atlassian.com/projects/spring/browse/SPRNET-497 Index: PageTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/PageTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PageTests.cs 28 Nov 2007 23:26:28 -0000 1.4 --- PageTests.cs 28 Nov 2007 23:40:25 -0000 1.5 *************** *** 21,24 **** --- 21,25 ---- #region Imports + using System; using System.Collections; using System.Globalization; *************** *** 95,98 **** --- 96,117 ---- } + [Test] + public void SetResultThrowsVerboseExceptionOnUnknownResultName() + { + string RESULTNAME = "nonexistant result"; + + TestPage page = new TestPage(); + try + { + page.SetResult(RESULTNAME); + Assert.Fail(); + } + catch(ArgumentException ae) + { + string expected = string.Format("No URL mapping found for the specified result '{0}'.", RESULTNAME); + string msg = ae.Message.Substring(0, expected.Length); + Assert.AreEqual(expected, msg); + } + } } } |
From: Erich E. <oak...@us...> - 2007-11-28 23:40:21
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2135 Modified Files: TestPage.cs Log Message: added test for http://opensource.atlassian.com/projects/spring/browse/SPRNET-497 Index: TestPage.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestPage.cs 28 Nov 2007 23:26:27 -0000 1.1 --- TestPage.cs 28 Nov 2007 23:40:14 -0000 1.2 *************** *** 45,48 **** --- 45,53 ---- } + public new void SetResult(string resultName) + { + base.SetResult(resultName); + } + public string Render(string newLine) { |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:32
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808/Web/Support Added Files: MimeMediaTypeTests.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) --- NEW FILE: MimeMediaTypeTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:32
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808/Util Modified Files: WebUtilsTests.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: WebUtilsTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Util/WebUtilsTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** WebUtilsTests.cs 1 Aug 2007 23:11:10 -0000 1.5 --- WebUtilsTests.cs 28 Nov 2007 23:26:28 -0000 1.6 *************** *** 136,139 **** --- 136,153 ---- public void TestCreateAbsolutePath() { + Assert.AreEqual("/", WebUtils.CreateAbsolutePath("", null)); + Assert.AreEqual("/", WebUtils.CreateAbsolutePath("/", null)); + Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", null)); + Assert.AreEqual("/MyApp/", WebUtils.CreateAbsolutePath("/MyApp", string.Empty)); + + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(null, "/MyPath")); + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(null, "~/MyPath")); + + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(string.Empty, "/MyPath")); + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath(string.Empty, "~/MyPath")); + + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "MyPath")); + Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "~/MyPath")); + Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "MyPath")); Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "~/MyPath")); *************** *** 141,147 **** Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp/", "~/MyPath")); Assert.AreEqual("/MyApp/MyPath", WebUtils.CreateAbsolutePath("/MyApp", "/MyApp/MyPath")); - Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "MyPath")); - Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("/", "~/MyPath")); - Assert.AreEqual("/MyPath", WebUtils.CreateAbsolutePath("", "~/MyPath")); } --- 155,158 ---- |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:32
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808/TestSupport Modified Files: TestWebContext.cs Added Files: TestPage.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) --- NEW FILE: TestPage.cs --- using System; using System.Collections; using System.Collections.Specialized; using System.IO; using System.Reflection; using System.Web; using System.Web.UI; using Page=Spring.Web.UI.Page; namespace Spring.TestSupport { public class TestPage : Page { public TestPage() { this.SharedState = CollectionsUtil.CreateCaseInsensitiveHashtable(); } public TestPage( HttpContext context ) :this() { SetIntrinsics(context); } public virtual void SetIntrinsics(HttpContext context) { MethodInfo miSetIntrinsics = typeof(System.Web.UI.Page).GetMethod("SetIntrinsics",BindingFlags.Instance|BindingFlags.NonPublic, null, new Type[] { typeof(HttpContext) }, null); miSetIntrinsics.Invoke(this, new object[] {context}); } public virtual void InitRecursive( Control namingContainer ) { MethodInfo miInitRecursive = typeof(System.Web.UI.Control).GetMethod("InitRecursive", BindingFlags.Instance | BindingFlags.NonPublic, null, new Type[] { typeof(Control) }, null); miInitRecursive.Invoke(this, new object[] {null}); } public new virtual void InitializeCulture() { base.InitializeCulture(); } protected override IDictionary CreateValidatorParameters() { return null; } public string Render(string newLine) { StringWriter sw = new StringWriter(); HtmlTextWriter writer = new HtmlTextWriter(sw, ""); writer.NewLine = newLine; base.Render(writer); writer.Flush(); writer.Close(); string result = sw.GetStringBuilder().ToString(); return result; } } } Index: TestWebContext.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestWebContext.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestWebContext.cs 29 May 2007 18:19:38 -0000 1.1 --- TestWebContext.cs 28 Nov 2007 23:26:27 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- using System; + using System.Collections.Specialized; using System.IO; using System.Web; *************** *** 44,48 **** HttpContext ctx = new HttpContext(wr); HttpContext.Current = ctx; ! ctx.Request.Browser = new HttpBrowserCapabilities(); } --- 45,54 ---- HttpContext ctx = new HttpContext(wr); HttpContext.Current = ctx; ! HttpBrowserCapabilities browser = new HttpBrowserCapabilities(); ! #if NET_2_0 ! browser.Capabilities = CollectionsUtil.CreateCaseInsensitiveHashtable(); ! browser.Capabilities[string.Empty] = "Test User Agent"; // string.Empty is the key for "user agent" ! #endif ! ctx.Request.Browser = browser; } |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:32
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808/Web/UI Modified Files: PageTests.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: PageTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/PageTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PageTests.cs 25 Aug 2007 14:26:36 -0000 1.3 --- PageTests.cs 28 Nov 2007 23:26:28 -0000 1.4 *************** *** 60,64 **** public void Validate() { ! Page page = new PageTest(); IValidator[] validators = new IValidator[] {new RequiredValidator("Name", null), new ConditionValidator("Loan == 0", "Age > 21")}; Contact contact = new Contact("Goran", 24, 0); --- 60,64 ---- public void Validate() { ! Page page = new TestPage(); IValidator[] validators = new IValidator[] {new RequiredValidator("Name", null), new ConditionValidator("Loan == 0", "Age > 21")}; Contact contact = new Contact("Goran", 24, 0); *************** *** 78,82 **** public void DefaultsToDefaultWebCultureResolver() { ! PageTest page = new PageTest(); Assert.AreEqual( typeof(DefaultWebCultureResolver), page.CultureResolver.GetType() ); } --- 78,82 ---- public void DefaultsToDefaultWebCultureResolver() { ! TestPage page = new TestPage(); Assert.AreEqual( typeof(DefaultWebCultureResolver), page.CultureResolver.GetType() ); } *************** *** 85,89 **** public void AllowsNeutralUserCulture() { ! PageTest page = new PageTest(); // DefaultWebCultureResolver does not allow culture to be set page.CultureResolver = new DefaultCultureResolver(); --- 85,89 ---- public void AllowsNeutralUserCulture() { ! TestPage page = new TestPage(); // DefaultWebCultureResolver does not allow culture to be set page.CultureResolver = new DefaultCultureResolver(); |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:31
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/Controls In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808/Web/UI/Controls Added Files: HeadTests.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) --- NEW FILE: HeadTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:30
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28808 Modified Files: Spring.Web.Tests.2003.csproj Spring.Web.Tests.2005.csproj Log Message: fixed SPRNET-723 (made Head control adhere to standards) 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.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Spring.Web.Tests.2003.csproj 14 Sep 2007 15:11:47 -0000 1.37 --- Spring.Web.Tests.2003.csproj 28 Nov 2007 23:26:27 -0000 1.38 *************** *** 178,182 **** /> <File ! RelPath = "TestSupport\PageTestObject.cs" SubType = "ASPXCodeBehind" BuildAction = "Compile" --- 178,182 ---- /> <File ! RelPath = "TestSupport\TestPage.cs" SubType = "ASPXCodeBehind" BuildAction = "Compile" *************** *** 204,208 **** <File RelPath = "Util\ControlInterceptionTests.cs" ! SubType = "Code" BuildAction = "Compile" /> --- 204,208 ---- <File RelPath = "Util\ControlInterceptionTests.cs" ! SubType = "ASPXCodeBehind" BuildAction = "Compile" /> *************** *** 222,225 **** --- 222,230 ---- /> <File + RelPath = "Web\Support\MimeMediaTypeTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Web\Support\ResultTests.cs" SubType = "Code" *************** *** 231,234 **** --- 236,244 ---- BuildAction = "Compile" /> + <File + RelPath = "Web\UI\Controls\HeadTests.cs" + SubType = "Code" + BuildAction = "Compile" + /> </Include> </Files> 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.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Spring.Web.Tests.2005.csproj 14 Sep 2007 15:45:51 -0000 1.21 --- Spring.Web.Tests.2005.csproj 28 Nov 2007 23:26:27 -0000 1.22 *************** *** 86,90 **** <SubType>Code</SubType> </Compile> ! <Compile Include="TestSupport\PageTestObject.cs"> <SubType>ASPXCodeBehind</SubType> </Compile> --- 86,90 ---- <SubType>Code</SubType> </Compile> ! <Compile Include="TestSupport\TestPage.cs"> <SubType>ASPXCodeBehind</SubType> </Compile> *************** *** 100,106 **** --- 100,108 ---- </Compile> <Compile Include="Web\Services\WebServiceExporterTests.cs" /> + <Compile Include="Web\Support\MimeMediaTypeTests.cs" /> <Compile Include="Web\Support\ResultTests.cs"> <SubType>Code</SubType> </Compile> + <Compile Include="Web\UI\Controls\HeadTests.cs" /> <Compile Include="Web\UI\PageTests.cs"> </Compile> |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:22
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Controls In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28796 Modified Files: Head.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: Head.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Controls/Head.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Head.cs 24 Jul 2007 14:32:58 -0000 1.7 --- Head.cs 28 Nov 2007 23:26:19 -0000 1.8 *************** *** 48,51 **** --- 48,65 ---- public class Head : Control { + private string _defaultStyleType = "text/css"; + + /// <summary> + /// Gets or sets the default mimetype for the <style> element's 'type' attribute + /// </summary> + /// <remarks> + /// Defaults to "text/css" + /// </remarks> + public string DefaultStyleType + { + get { return _defaultStyleType; } + set { _defaultStyleType = value; } + } + /// <summary> /// Gets a reference to the <see cref="T:Spring.Web.UI.Page"/> instance that contains the *************** *** 71,74 **** --- 85,89 ---- bool hasIntrinsicHead = (this.Page.Header != null); #endif + // don't render begin/end element if we are nested within an ASP.NET <head> control if (!hasIntrinsicHead) { *************** *** 91,99 **** if (Page.Styles.Count > 0) { writer.RenderBeginTag(HtmlTextWriterTag.Style); ! foreach (DictionaryEntry style in Page.Styles) { ! writer.WriteLine(style.Key + " { " + style.Value + "}"); } writer.RenderEndTag(); --- 106,115 ---- if (Page.Styles.Count > 0) { + writer.AddAttribute(HtmlTextWriterAttribute.Type, _defaultStyleType); writer.RenderBeginTag(HtmlTextWriterTag.Style); ! foreach (DictionaryEntry style in Page.Styles) { ! writer.WriteLine(style.Key + " { " + style.Value + " }"); } writer.RenderEndTag(); *************** *** 104,113 **** { foreach (DictionaryEntry file in Page.StyleFiles) ! { ! writer.AddAttribute("rel", "stylesheet"); writer.AddAttribute(HtmlTextWriterAttribute.Type, "text/css"); writer.AddAttribute(HtmlTextWriterAttribute.Href, WebUtils.CreateAbsolutePath(Page.CssRoot, (string)file.Value)); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Link); writer.RenderEndTag(); } --- 120,129 ---- { foreach (DictionaryEntry file in Page.StyleFiles) ! { ! writer.AddAttribute("rel", "stylesheet"); writer.AddAttribute(HtmlTextWriterAttribute.Type, "text/css"); writer.AddAttribute(HtmlTextWriterAttribute.Href, WebUtils.CreateAbsolutePath(Page.CssRoot, (string)file.Value)); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Link); writer.RenderEndTag(); } *************** *** 119,125 **** { object script = scriptEntry.Value; ! if (script is ScriptBlock) { ! RenderScriptBlock(writer, script as ScriptBlock); } else if (script is ScriptFile) --- 135,141 ---- { object script = scriptEntry.Value; ! if (script is ScriptEvent) { ! RenderScriptEvent(writer, script as ScriptEvent); } else if (script is ScriptFile) *************** *** 127,133 **** RenderScriptFile(writer, script as ScriptFile); } ! else if (script is ScriptEvent) { ! RenderScriptEvent(writer, script as ScriptEvent); } } --- 143,149 ---- RenderScriptFile(writer, script as ScriptFile); } ! else if (script is ScriptBlock) { ! RenderScriptBlock(writer, script as ScriptBlock); } } *************** *** 136,142 **** private void RenderScriptBlock(HtmlTextWriter writer, ScriptBlock script) { ! writer.AddAttribute("language", script.Language); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.WriteLine(script.Script); writer.RenderEndTag(); --- 152,157 ---- private void RenderScriptBlock(HtmlTextWriter writer, ScriptBlock script) { ! RenderCommonScriptAttributes(writer, script); ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.WriteLine(script.Script); writer.RenderEndTag(); *************** *** 145,152 **** private void RenderScriptFile(HtmlTextWriter writer, ScriptFile script) { ! writer.AddAttribute("language", script.Language); ! writer.AddAttribute(HtmlTextWriterAttribute.Src, WebUtils.CreateAbsolutePath(Page.ScriptsRoot, script.FileName)); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.RenderEndTag(); } --- 160,167 ---- private void RenderScriptFile(HtmlTextWriter writer, ScriptFile script) { ! RenderCommonScriptAttributes(writer, script); ! writer.AddAttribute(HtmlTextWriterAttribute.Src, WebUtils.CreateAbsolutePath(Page.ScriptsRoot, script.FileName)); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.RenderEndTag(); } *************** *** 154,165 **** private void RenderScriptEvent(HtmlTextWriter writer, ScriptEvent script) { ! writer.AddAttribute("language", script.Language); ! writer.AddAttribute(HtmlTextWriterAttribute.For, script.Element); writer.AddAttribute("event", script.EventName); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.WriteLine(script.Script); writer.RenderEndTag(); } } } \ No newline at end of file --- 169,189 ---- private void RenderScriptEvent(HtmlTextWriter writer, ScriptEvent script) { ! RenderCommonScriptAttributes(writer, script); ! writer.AddAttribute(HtmlTextWriterAttribute.For, script.Element); writer.AddAttribute("event", script.EventName); ! ! writer.RenderBeginTag(HtmlTextWriterTag.Script); writer.WriteLine(script.Script); writer.RenderEndTag(); } + + private void RenderCommonScriptAttributes(HtmlTextWriter writer, Script script) + { + if (StringUtils.HasLength(script.Language)) + { + writer.AddAttribute("language", script.Language); + } + writer.AddAttribute("type", script.Type.ToString()); + } } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:13
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28737/Support Modified Files: Script.cs Added Files: MimeMediaType.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) --- NEW FILE: MimeMediaType.cs --- (This appears to be a binary file; contents omitted.) Index: Script.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support/Script.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Script.cs 18 May 2006 21:37:52 -0000 1.3 --- Script.cs 28 Nov 2007 23:26:10 -0000 1.4 *************** *** 19,22 **** --- 19,24 ---- #endregion + using Spring.Util; + namespace Spring.Web.Support { *************** *** 34,43 **** internal abstract class Script { ! internal const string DefaultLanguage = "Javascript"; private string language; /// <summary> ! /// Default constructor. /// </summary> /// <param name="language">Script language.</param> --- 36,46 ---- internal abstract class Script { ! internal static readonly MimeMediaType DefaultType = MimeMediaType.Text.Javascript; private string language; + private MimeMediaType type; /// <summary> ! /// Initialize a new Script object of the specified language /// </summary> /// <param name="language">Script language.</param> *************** *** 48,51 **** --- 51,63 ---- /// <summary> + /// Initialize a new script object of the specified type + /// </summary> + /// <param name="type">a <see cref="MimeMediaType"/></param> + public Script(MimeMediaType type) + { + this.Type = type; + } + + /// <summary> /// Gets or sets script language. /// </summary> *************** *** 55,58 **** --- 67,79 ---- set { language = value; } } + + /// <summary> + /// Gets or sets script mime type + /// </summary> + public MimeMediaType Type + { + get { return type; } + set { AssertUtils.ArgumentNotNull(value, "Type"); type = value; } + } } *************** *** 83,86 **** --- 104,117 ---- /// <summary> + /// Initialize a new script block instance. + /// </summary> + /// <param name="type">the script language's <see cref="MimeMediaType"/></param> + /// <param name="script">the script body</param> + public ScriptBlock(MimeMediaType type, string script) : base(type) + { + this.script = script; + } + + /// <summary> /// Gets or sets the script text. /// </summary> *************** *** 108,112 **** /// <summary> ! /// Default constructor. /// </summary> /// <param name="language">Script language.</param> --- 139,143 ---- /// <summary> ! /// Initialize a new <see cref="ScriptFile"/> instance. /// </summary> /// <param name="language">Script language.</param> *************** *** 118,121 **** --- 149,163 ---- /// <summary> + /// Initialize a new <see cref="ScriptFile"/> instance. + /// </summary> + /// <param name="type">the script language's <see cref="MimeMediaType"/></param> + /// <param name="fileName">the (virtual) path to the script</param> + public ScriptFile(MimeMediaType type, string fileName) + : base(type) + { + this.fileName = fileName; + } + + /// <summary> /// Gets or sets the name of the script file. /// </summary> *************** *** 144,148 **** /// <summary> ! /// Default constructor. /// </summary> /// <param name="language">Script language.</param> --- 186,190 ---- /// <summary> ! /// Initialize a new <see cref="ScriptEvent"/> instance. /// </summary> /// <param name="language">Script language.</param> *************** *** 157,160 **** --- 199,216 ---- /// <summary> + /// Initialize a new <see cref="ScriptEvent"/> instance. + /// </summary> + /// <param name="type">the script language's <see cref="MimeMediaType"/></param> + /// <param name="element">Element ID of the event source.</param> + /// <param name="eventName">Name of the event to handle.</param> + /// <param name="script">Script text.</param> + public ScriptEvent(MimeMediaType type, string element, string eventName, string script) + : base(type, script) + { + this.element = element; + this.eventName = eventName; + } + + /// <summary> /// Gets or sets the element ID. /// </summary> |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:13
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28737/UI Modified Files: Page.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: Page.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Page.cs,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Page.cs 25 Aug 2007 14:26:35 -0000 1.84 --- Page.cs 28 Nov 2007 23:26:10 -0000 1.85 *************** *** 893,897 **** public void RegisterHeadScriptBlock(string key, string script) { ! RegisterHeadScriptBlock(key, Script.DefaultLanguage, script); } --- 893,897 ---- public void RegisterHeadScriptBlock(string key, string script) { ! RegisterHeadScriptBlock(key, Script.DefaultType, script); } *************** *** 902,905 **** --- 902,906 ---- /// <param name="language">Script language.</param> /// <param name="script">Script text.</param> + [Obsolete("The 'language' attribute is deprecated. Please use RegisterHeadScriptBlock(string key, MimeMediaType type, string script) instead", false)] public void RegisterHeadScriptBlock(string key, string language, string script) { *************** *** 908,911 **** --- 909,923 ---- /// <summary> + /// Registers script block that should be rendered within the <c>head</c> HTML element. + /// </summary> + /// <param name="key">Script key.</param> + /// <param name="type">Script language MIME type.</param> + /// <param name="script">Script text.</param> + public void RegisterHeadScriptBlock(string key, MimeMediaType type, string script) + { + headScripts[key] = new ScriptBlock(type, script); + } + + /// <summary> /// Registers script file that should be referenced within the <c>head</c> HTML element. /// </summary> *************** *** 914,918 **** public void RegisterHeadScriptFile(string key, string fileName) { ! RegisterHeadScriptFile(key, Script.DefaultLanguage, fileName); } --- 926,930 ---- public void RegisterHeadScriptFile(string key, string fileName) { ! RegisterHeadScriptFile(key, Script.DefaultType, fileName); } *************** *** 923,926 **** --- 935,939 ---- /// <param name="language">Script language.</param> /// <param name="fileName">Script file name.</param> + [Obsolete("The 'language' attribute is deprecated. Please use RegisterHeadScriptFile(string key, MimeMediaType type, string filename) instead", false)] public void RegisterHeadScriptFile(string key, string language, string fileName) { *************** *** 929,932 **** --- 942,956 ---- /// <summary> + /// Registers script file that should be referenced within the <c>head</c> HTML element. + /// </summary> + /// <param name="key">Script key.</param> + /// <param name="type">Script language MIME type.</param> + /// <param name="fileName">Script file name.</param> + public void RegisterHeadScriptFile(string key, MimeMediaType type, string fileName) + { + headScripts[key] = new ScriptFile(type, fileName); + } + + /// <summary> /// Registers script block that should be rendered within the <c>head</c> HTML element. /// </summary> *************** *** 937,941 **** public void RegisterHeadScriptEvent(string key, string element, string eventName, string script) { ! RegisterHeadScriptEvent(key, Script.DefaultLanguage, element, eventName, script); } --- 961,965 ---- public void RegisterHeadScriptEvent(string key, string element, string eventName, string script) { ! RegisterHeadScriptEvent(key, Script.DefaultType, element, eventName, script); } *************** *** 948,951 **** --- 972,976 ---- /// <param name="eventName">Name of the event to handle.</param> /// <param name="script">Script text.</param> + [Obsolete("The 'language' attribute is deprecated. Please use RegisterHeadScriptEvent(string key, MimeMediaType mimeType, string element, string eventName, string script) instead")] public void RegisterHeadScriptEvent(string key, string language, string element, string eventName, string script) { *************** *** 954,957 **** --- 979,995 ---- /// <summary> + /// Registers script block that should be rendered within the <c>head</c> HTML element. + /// </summary> + /// <param name="key">Script key.</param> + /// <param name="mimeType">The scripting language's MIME type.</param> + /// <param name="element">Element ID of the event source.</param> + /// <param name="eventName">Name of the event to handle.</param> + /// <param name="script">Script text.</param> + public void RegisterHeadScriptEvent(string key, MimeMediaType mimeType, string element, string eventName, string script) + { + headScripts[key] = new ScriptEvent(mimeType, element, eventName, script); + } + + /// <summary> /// Returns <c>True</c> if specified head script is registered, <c>False</c> otherwise. /// </summary> |
From: Erich E. <oak...@us...> - 2007-11-28 23:26:04
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28406 Modified Files: WebUtils.cs Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: WebUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util/WebUtils.cs,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** WebUtils.cs 1 Aug 2007 23:37:14 -0000 1.30 --- WebUtils.cs 28 Nov 2007 23:26:00 -0000 1.31 *************** *** 158,172 **** public static string CreateAbsolutePath(string applicationPath, string relativePath) { ! if (relativePath.StartsWith("/")) { ! return relativePath; ! } ! if (relativePath.StartsWith("~/")) ! { ! relativePath = relativePath.Substring(2); } ! return applicationPath.TrimEnd('/') + '/' + relativePath; } --- 158,177 ---- public static string CreateAbsolutePath(string applicationPath, string relativePath) { ! if (StringUtils.HasLength(relativePath)) { ! if (relativePath.StartsWith("/")) ! { ! return relativePath; ! } ! if (relativePath.StartsWith("~/")) ! { ! relativePath = relativePath.Substring(2); ! } } ! applicationPath = (applicationPath == null) ? "" : applicationPath.TrimEnd('/'); ! ! return string.Format("{0}/{1}", applicationPath, relativePath); } |
From: Erich E. <oak...@us...> - 2007-11-28 23:25:50
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28385/Spring.Web Modified Files: Spring.Web.2003.csproj Spring.Web.2005.csproj Log Message: fixed SPRNET-723 (made Head control adhere to standards) Index: Spring.Web.2003.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Spring.Web.2003.csproj,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Spring.Web.2003.csproj 14 Sep 2007 15:11:46 -0000 1.23 --- Spring.Web.2003.csproj 28 Nov 2007 23:25:46 -0000 1.24 *************** *** 2,6 **** <CSHARP ProjectType = "Local" ! ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{BA4789EB-281A-48EA-8763-28B9F0596A18}" --- 2,6 ---- <CSHARP ProjectType = "Local" ! ProductVersion = "7.10.6030" SchemaVersion = "2.0" ProjectGuid = "{BA4789EB-281A-48EA-8763-28B9F0596A18}" *************** *** 427,430 **** --- 427,435 ---- /> <File + RelPath = "Web\Support\MimeMediaType.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Web\Support\PageHandlerFactory.cs" SubType = "ASPXCodeBehind" Index: Spring.Web.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Spring.Web.2005.csproj,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Spring.Web.2005.csproj 14 Sep 2007 15:45:50 -0000 1.36 --- Spring.Web.2005.csproj 28 Nov 2007 23:25:46 -0000 1.37 *************** *** 123,126 **** --- 123,127 ---- <SubType>Code</SubType> </Compile> + <Compile Include="Web\Support\MimeMediaType.cs" /> <Compile Include="Web\Support\SharedStateResourceCache.cs"> <SubType>Code</SubType> |
From: Erich E. <oak...@us...> - 2007-11-28 23:20:10
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/Controls In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26004/Controls Log Message: Directory /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/Controls added to the repository |