springnet-commits Mailing List for Spring Framework .NET (Page 13)
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: Erich E. <oak...@us...> - 2008-03-20 09:07:57
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Expressions In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19329/Expressions Added Files: MethodNodeTests.cs Log Message: SPRNET-755 --- NEW FILE: MethodNodeTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2008-03-20 09:07:55
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19329 Modified Files: Spring.Core.Tests.2005.csproj Log Message: SPRNET-755 Index: Spring.Core.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2005.csproj,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** Spring.Core.Tests.2005.csproj 5 Feb 2008 20:40:26 -0000 1.73 --- Spring.Core.Tests.2005.csproj 20 Mar 2008 09:07:52 -0000 1.74 *************** *** 273,276 **** --- 273,277 ---- <SubType>Code</SubType> </Compile> + <Compile Include="Expressions\MethodNodeTests.cs" /> <Compile Include="Globalization\AbstractLocalizerTests.cs"> <SubType>Code</SubType> |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:49
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005/Config In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/examples/Spring/SpringAir/src/SpringAir.Web.2005/Config Modified Files: Services.xml Log Message: fixed SPRNET-762 Index: Services.xml =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005/Config/Services.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Services.xml 16 Nov 2006 02:30:49 -0000 1.2 --- Services.xml 19 Mar 2008 18:05:05 -0000 1.3 *************** *** 7,11 **** <!-- Web service definitions --> ! <object id="bookingAgentWebService" type="Spring.Web.Services.WebServiceExporter, Spring.Web"> <property name="TargetName" value="bookingAgent"/> <property name="Name" value="BookingAgent"/> --- 7,11 ---- <!-- Web service definitions --> ! <object id="bookingAgentWebService" name="/BookingAgent.asmx" type="Spring.Web.Services.WebServiceExporter, Spring.Web"> <property name="TargetName" value="bookingAgent"/> <property name="Name" value="BookingAgent"/> |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2005.csproj Log Message: fixed SPRNET-762 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.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Spring.Web.Tests.2005.csproj 19 Mar 2008 12:07:15 -0000 1.31 --- Spring.Web.Tests.2005.csproj 19 Mar 2008 18:05:08 -0000 1.32 *************** *** 105,108 **** --- 105,109 ---- </Compile> <Compile Include="Web\Services\WebServiceExporterTests.cs" /> + <Compile Include="Web\Support\AbstractHandlerFactoryTests.cs" /> <Compile Include="Web\Support\MimeMediaTypeTests.cs" /> <Compile Include="Web\Support\PageHandlerFactoryTests.cs" /> |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/src/Spring/Spring.Web/Util Modified Files: WebUtils.cs Log Message: fixed SPRNET-762 Index: WebUtils.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util/WebUtils.cs,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** WebUtils.cs 28 Nov 2007 23:26:00 -0000 1.31 --- WebUtils.cs 19 Mar 2008 18:05:07 -0000 1.32 *************** *** 147,151 **** /// <p> /// If relative path starts with '/' (forward slash), no concatenation will occur ! /// and it will be assumes that the relative path specified is indeed the absolute path /// and will be returned verbatim.</p> /// <p> --- 147,151 ---- /// <p> /// If relative path starts with '/' (forward slash), no concatenation will occur ! /// and it will be assumed that the relative path specified is indeed the absolute path /// and will be returned verbatim.</p> /// <p> *************** *** 210,213 **** --- 210,246 ---- return combinedPath; } + + /// <summary> + /// Gets the application-relative virtual path portion of the given absolute URL. + /// </summary> + /// <param name="url">the absolute url</param> + /// <returns>the url relative to the current application's virtual path</returns> + public static string GetAppRelativePath(string url) + { + string appPath = VirtualEnvironment.ApplicationVirtualPath; + return GetRelativePath(appPath, url); + } + + /// <summary> + /// Gets the virtual path portion of the given absolute URL + /// relative to the given base path. + /// </summary> + /// <remarks> + /// Base path comparison is done case insensitive. + /// </remarks> + /// <param name="basePath">the absolute base path</param> + /// <param name="url">the absolute url</param> + /// <returns>the url relative to the given basePath</returns> + public static string GetRelativePath(string basePath, string url) + { + // strip application path from url + string appPath = basePath.TrimEnd('/'); + string appRelativeVirtualPath = url; + if (appRelativeVirtualPath.ToLower().StartsWith(appPath.ToLower())) + { + appRelativeVirtualPath = appRelativeVirtualPath.Substring(appPath.Length); + } + return appRelativeVirtualPath; + } } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/test/Spring/Spring.Web.Tests/Web/Support Added Files: AbstractHandlerFactoryTests.cs Log Message: fixed SPRNET-762 --- NEW FILE: AbstractHandlerFactoryTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Util In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/test/Spring/Spring.Web.Tests/Util Modified Files: WebUtilsTests.cs Log Message: fixed SPRNET-762 Index: WebUtilsTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Util/WebUtilsTests.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** WebUtilsTests.cs 14 Mar 2008 12:02:46 -0000 1.8 --- WebUtilsTests.cs 19 Mar 2008 18:05:08 -0000 1.9 *************** *** 208,211 **** --- 208,220 ---- Assert.AreEqual(appPath + "mypath/my.file", WebUtils.CombineVirtualPaths("/myotherdir/some.file", "~/mypath/my.file")); } + + [Test] + public void GetRelativePath() + { + // case-insensitive + Assert.AreEqual("/Mypath", WebUtils.GetRelativePath("/mydir/", "/myDir/Mypath")); + Assert.AreEqual("/mYpath", WebUtils.GetRelativePath("/Mydir", "/mYdir/mYpath")); + Assert.AreEqual("/myotherdir/mypath", WebUtils.GetRelativePath("/mydir", "/myotherdir/mypath")); + } } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/src/Spring/Spring.Web/Web/Support Modified Files: AbstractHandlerFactory.cs PageHandlerFactory.cs Log Message: fixed SPRNET-762 Index: PageHandlerFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support/PageHandlerFactory.cs,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PageHandlerFactory.cs 27 Jan 2008 23:29:55 -0000 1.34 --- PageHandlerFactory.cs 19 Mar 2008 18:05:08 -0000 1.35 *************** *** 110,158 **** } ! // strip application path from url ! string appPath = context.Request.ApplicationPath.TrimEnd('/'); ! string appRelativeVirtualPath = url; ! if (appRelativeVirtualPath.ToLower().StartsWith(appPath.ToLower())) ! { ! appRelativeVirtualPath = appRelativeVirtualPath.Substring(appPath.Length); ! } ! ! string pageId = appRelativeVirtualPath; ! // lookup definition using app-relative url ! if (isDebug) Log.Debug(string.Format("GetHandler():looking up definition for app-relative url '{0}'", appRelativeVirtualPath)); ! IObjectDefinition pageDefinition = (appContext != null) ? appContext.ObjectFactory.GetObjectDefinition(appRelativeVirtualPath, true) : null; ! if (pageDefinition == null) ! { ! // try using pagename only ! // only looks in the specified context -- it will *not* search parent contexts ! string pageName = WebUtils.GetPageName(appRelativeVirtualPath); ! pageDefinition = (appContext != null) ? appContext.ObjectFactory.GetObjectDefinition(pageName, false) : null; ! if (pageDefinition != null) ! { ! pageId = pageName; ! if (isDebug) ! Log.Debug(string.Format("GetHandler():found definition for page-name '{0}'", pageName)); ! } ! else ! { ! if (isDebug) ! Log.Debug(string.Format("GetHandler():no definition found for page-name '{0}'", pageName)); ! } ! } ! else ! { ! if (isDebug) Log.Debug(string.Format("GetHandler():found definition for page-url '{0}'", appRelativeVirtualPath)); ! } ! if (pageDefinition != null) { ! Type pageType = pageDefinition.ObjectType; if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { ! handler = new SessionAwarePageHandler(appContext, pageId, url, null); } else { ! handler = new PageHandler(appContext, pageId, url, null); } } --- 110,126 ---- } ! string appRelativeVirtualPath = WebUtils.GetAppRelativePath(url); ! NamedObjectDefinition namedPageDefinition = FindWebObjectDefinition(appRelativeVirtualPath, appContext.ObjectFactory); ! if (namedPageDefinition != null) { ! Type pageType = namedPageDefinition.ObjectDefinition.ObjectType; if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { ! handler = new SessionAwarePageHandler(appContext, namedPageDefinition.Name, url, null); } else { ! handler = new PageHandler(appContext, namedPageDefinition.Name, url, null); } } *************** *** 164,172 **** if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { ! handler = new SessionAwarePageHandler(appContext, pageId, url, physicalPath); } else { ! handler = new PageHandler(appContext, pageId, url, physicalPath); } } --- 132,140 ---- if (typeof(IRequiresSessionState).IsAssignableFrom(pageType)) { ! handler = new SessionAwarePageHandler(appContext, appRelativeVirtualPath, url, physicalPath); } else { ! handler = new PageHandler(appContext, appRelativeVirtualPath, url, physicalPath); } } Index: AbstractHandlerFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Support/AbstractHandlerFactory.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AbstractHandlerFactory.cs 18 May 2006 21:37:52 -0000 1.4 --- AbstractHandlerFactory.cs 19 Mar 2008 18:05:08 -0000 1.5 *************** *** 21,25 **** --- 21,29 ---- #region Imports + using System.IO; using System.Web; + using Common.Logging; + using Spring.Objects.Factory.Config; + using Spring.Util; #endregion *************** *** 83,86 **** --- 87,183 ---- public virtual void ReleaseHandler(IHttpHandler handler) {} + + /// <summary> + /// DO NOT USE - this is subject to change! + /// </summary> + /// <param name="appRelativeVirtualPath"></param> + /// <param name="objectFactory"></param> + /// <returns> + /// This method requires registrars to follow the convention of registering web object definitions using their + /// application relative urls (~/mypath/mypage.aspx). + /// </returns> + /// <remarks> + /// Resolve an object definition by url. + /// </remarks> + protected internal static NamedObjectDefinition FindWebObjectDefinition(string appRelativeVirtualPath, IConfigurableListableObjectFactory objectFactory) + { + ILog Log = LogManager.GetLogger(typeof(AbstractHandlerFactory)); + bool isDebug = Log.IsDebugEnabled; + + // lookup definition using app-relative url + if (isDebug) Log.Debug(string.Format("GetHandler():looking up definition for app-relative url '{0}'", appRelativeVirtualPath)); + string objectDefinitionName = appRelativeVirtualPath; + IObjectDefinition pageDefinition = objectFactory.GetObjectDefinition(appRelativeVirtualPath, true); + + if (pageDefinition == null) + { + // try using pagename+extension and pagename only + string pageExtension = Path.GetExtension(appRelativeVirtualPath); + string pageName = WebUtils.GetPageName(appRelativeVirtualPath); + // only looks in the specified object factory -- it will *not* search parent contexts + pageDefinition = objectFactory.GetObjectDefinition(pageName + pageExtension, false); + if (pageDefinition == null) + { + pageDefinition = objectFactory.GetObjectDefinition(pageName, false); + if (pageDefinition != null) objectDefinitionName = pageName; + } + else + { + objectDefinitionName = pageName + pageExtension; + } + + if (pageDefinition != null) + { + if (isDebug) + Log.Debug(string.Format("GetHandler():found definition for page-name '{0}'", objectDefinitionName)); + } + else + { + if (isDebug) + Log.Debug(string.Format("GetHandler():no definition found for page-name '{0}'", pageName)); + } + } + else + { + if (isDebug) Log.Debug(string.Format("GetHandler():found definition for page-url '{0}'", appRelativeVirtualPath)); + } + + return (pageDefinition == null) ? (NamedObjectDefinition)null : new NamedObjectDefinition(objectDefinitionName, pageDefinition); + } + + /// <summary> + /// DO NOT USE - this is subject to change! + /// </summary> + protected internal class NamedObjectDefinition + { + private readonly string _name; + private readonly IObjectDefinition _objectDefinition; + + /// <summary> + /// DO NOT USE + /// </summary> + public NamedObjectDefinition(string name, IObjectDefinition objectDefinition) + { + _name = name; + _objectDefinition = objectDefinition; + } + + /// <summary> + /// DO NOT USE + /// </summary> + public string Name + { + get { return _name; } + } + + /// <summary> + /// DO NOT USE + /// </summary> + public IObjectDefinition ObjectDefinition + { + get { return _objectDefinition; } + } + } } + } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/src/Spring/Spring.Web/Web/Services Modified Files: WebServiceHandlerFactory.cs Log Message: fixed SPRNET-762 Index: WebServiceHandlerFactory.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** WebServiceHandlerFactory.cs 24 Oct 2006 03:31:29 -0000 1.11 --- WebServiceHandlerFactory.cs 19 Mar 2008 18:05:08 -0000 1.12 *************** *** 31,34 **** --- 31,35 ---- using Spring.Context.Support; using Spring.Util; + using Spring.Web.Support; #endregion *************** *** 66,77 **** new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal).Demand(); ! string serviceName = WebUtils.GetPageName(url); ! IApplicationContext appContext = WebApplicationContext.Current; Type serviceType = null; ! if (appContext.ContainsObjectDefinition(serviceName)) { ! serviceType = appContext.GetType(serviceName); ! // check if the type defines a Web Service object[] wsAttribute = serviceType.GetCustomAttributes(typeof(WebServiceAttribute), true); --- 67,89 ---- new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal).Demand(); ! IConfigurableApplicationContext appContext = ! WebApplicationContext.GetContext(url) as IConfigurableApplicationContext; ! ! if (appContext == null) ! { ! throw new InvalidOperationException( ! "Implementations of IApplicationContext must also implement IConfigurableApplicationContext"); ! } ! ! string appRelativeVirtualPath = WebUtils.GetAppRelativePath(url); ! ! AbstractHandlerFactory.NamedObjectDefinition nod = ! AbstractHandlerFactory.FindWebObjectDefinition(appRelativeVirtualPath, appContext.ObjectFactory); Type serviceType = null; ! if (nod != null) { ! serviceType = appContext.GetType(nod.Name); ! // check if the type defines a Web Service object[] wsAttribute = serviceType.GetCustomAttributes(typeof(WebServiceAttribute), true); *************** *** 79,83 **** { serviceType = null; ! } } --- 91,95 ---- { serviceType = null; ! } } |
From: Erich E. <oak...@us...> - 2008-03-19 18:05:15
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/examples/Spring/SpringAir/src/SpringAir.Web.2005 Modified Files: Web.config Log Message: fixed SPRNET-762 Index: Web.config =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005/Web.config,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Web.config 8 Aug 2007 03:13:30 -0000 1.8 --- Web.config 19 Mar 2008 18:05:06 -0000 1.9 *************** *** 2,8 **** <configuration> <configSections> ! <sectionGroup name="common"> ! <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> ! </sectionGroup> <sectionGroup name="spring"> <section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/> --- 2,8 ---- <configuration> <configSections> ! <sectionGroup name="common"> ! <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging"/> ! </sectionGroup> <sectionGroup name="spring"> <section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core"/> *************** *** 13,45 **** <section name="databaseSettings" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </configSections> ! ! <common> ! <logging> ! <!-- You may use http://www.microsoft.com/technet/sysinternals/Miscellaneous/DebugView.mspx for viewing TraceLogger output --> ! <factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"> ! <arg key="Level" value="ALL" /> <!-- Possible values are ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF --> ! </factoryAdapter> ! </logging> ! </common> ! ! <spring> ! <parsers> ! <parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data" /> ! </parsers> ! <context> ! <resource uri="~/Config/Aspects.xml"/> <resource uri="~/Config/Web.xml"/> <resource uri="~/Config/Services.xml"/> - <!-- TEST CONFIGURATION --> - <resource uri="~/Config/Test/Services.xml"/> <resource uri="~/Config/Test/Dao.xml"/> - <!-- PRODUCTION CONFIGURATION --> ! <!-- <resource uri="~/Config/Production/Services.xml"/> <resource uri="~/Config/Production/Dao.xml"/> --- 13,41 ---- <section name="databaseSettings" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> </configSections> ! <common> ! <logging> ! <!-- You may use http://www.microsoft.com/technet/sysinternals/Miscellaneous/DebugView.mspx for viewing TraceLogger output --> ! <factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"> ! <arg key="Level" value="ALL"/> ! <!-- Possible values are ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF --> ! </factoryAdapter> ! </logging> ! </common> ! <spring> ! <parsers> ! <parser type="Spring.Data.Config.DatabaseNamespaceParser, Spring.Data"/> ! </parsers> ! <context> ! <resource uri="~/Config/Aspects.xml"/> <resource uri="~/Config/Web.xml"/> <resource uri="~/Config/Services.xml"/> <!-- TEST CONFIGURATION --> <resource uri="~/Config/Test/Services.xml"/> <resource uri="~/Config/Test/Dao.xml"/> <!-- PRODUCTION CONFIGURATION --> ! <!-- <resource uri="~/Config/Production/Services.xml"/> <resource uri="~/Config/Production/Dao.xml"/> *************** *** 47,51 **** </context> </spring> - <system.web> <pages> --- 43,46 ---- *************** *** 66,73 **** <assemblies> <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> ! <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies> </compilation> </system.web> - <databaseSettings> <add key="db.server" value="(local)"/> --- 61,68 ---- <assemblies> <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> ! <add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> ! <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies> </compilation> </system.web> <databaseSettings> <add key="db.server" value="(local)"/> *************** *** 76,79 **** <add key="db.schema" value="SpringAir"/> </databaseSettings> - </configuration> --- 71,73 ---- |
From: Erich E. <oak...@us...> - 2008-03-19 12:07:49
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv877/src/Spring/Spring.Web Modified Files: Spring.Web.2005.csproj Log Message: SPRNET-558, SPRNET-559 introduced new IValidationContainer interface Index: Spring.Web.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Spring.Web.2005.csproj,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Spring.Web.2005.csproj 2 Feb 2008 16:31:08 -0000 1.38 --- Spring.Web.2005.csproj 19 Mar 2008 12:07:14 -0000 1.39 *************** *** 123,126 **** --- 123,127 ---- <SubType>Code</SubType> </Compile> + <Compile Include="Web\UI\IValidationContainer.cs" /> <Compile Include="Web\Support\MimeMediaType.cs" /> <Compile Include="Web\Support\SharedStateResourceCache.cs"> *************** *** 213,216 **** --- 214,218 ---- </Compile> <Compile Include="Web\UI\Controls\AbstractBaseValidator.cs" /> + <Compile Include="Web\UI\Controls\AbstractValidationControl.cs" /> <Compile Include="Web\UI\Controls\Calendar.cs"> <SubType>Code</SubType> |
From: Erich E. <oak...@us...> - 2008-03-19 12:07:48
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Controls In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv877/src/Spring/Spring.Web/Web/UI/Controls Modified Files: ValidationError.cs ValidationSummary.cs Added Files: AbstractValidationControl.cs Log Message: SPRNET-558, SPRNET-559 introduced new IValidationContainer interface Index: ValidationSummary.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Controls/ValidationSummary.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ValidationSummary.cs 26 Feb 2008 22:33:37 -0000 1.10 --- ValidationSummary.cs 19 Mar 2008 12:07:14 -0000 1.11 *************** *** 19,26 **** #endregion ! using System.Collections; ! using System.Web.UI; using Spring.Web.UI.Validation; namespace Spring.Web.UI.Controls { --- 19,28 ---- #endregion ! #region Imports ! using Spring.Web.UI.Validation; + #endregion + namespace Spring.Web.UI.Controls { *************** *** 32,121 **** /// <author>Jonathan Allenby</author> /// <version>$Id$</version> ! public class ValidationSummary : Control { - private string provider; - private IValidationErrorsRenderer renderer; - /// <summary> ! /// Gets or sets the provider. ! /// </summary> ! /// <value>The provider.</value> ! public string Provider ! { ! get ! { ! if (this.provider == null) ! { ! return this.ID; ! } ! return this.provider; ! } ! set { this.provider = value; } ! } ! ! /// <summary> ! /// Gets or sets the validation errors renderer to use. ! /// </summary> ! /// <remarks> ! /// If not explicitly specified, defaults to <see cref="DivValidationErrorsRenderer"/>. ! /// </remarks> ! /// <value>The validation errors renderer to use.</value> ! public IValidationErrorsRenderer Renderer ! { ! get ! { ! if (this.renderer == null) ! { ! this.renderer = new DivValidationErrorsRenderer(); ! } ! return this.renderer; ! } ! set { this.renderer = value; } ! } ! ! /// <summary> ! /// Gets a reference to the <see cref="T:Spring.Web.UI.Page"/> instance that contains the ! /// server control. ! /// </summary> ! /// <value></value> ! new private Page Page ! { ! get { return base.Page as Page; } ! } ! ! /// <summary> ! /// Renders control. /// </summary> ! /// <param name="writer"></param> ! protected override void Render(HtmlTextWriter writer) { ! #if ! NET_2_0 ! bool DesignMode = this.Context == null; ! #endif ! if (!DesignMode) ! { ! if (Visible) ! { ! IList errorMessages; ! #if NET_1_1 ! errorMessages = this.Page.ValidationErrors.GetResolvedErrors(this.Provider, this.Page.MessageSource); ! #else ! System.Type t = typeof(Spring.Web.UI.Page); ! ! if (this.TemplateControl != null) t = this.TemplateControl.GetType(); ! ! if (t.IsSubclassOf(typeof(Spring.Web.UI.UserControl))) ! { ! Spring.Web.UI.UserControl container = (Spring.Web.UI.UserControl)this.TemplateControl as Spring.Web.UI.UserControl; ! errorMessages = container.ValidationErrors.GetResolvedErrors(this.Provider, container.MessageSource); ! } ! else ! { ! errorMessages = this.Page.ValidationErrors.GetResolvedErrors(this.Provider, this.Page.MessageSource); ! } ! #endif ! Renderer.RenderErrors(Page, writer, errorMessages); ! } ! } } } --- 34,46 ---- /// <author>Jonathan Allenby</author> /// <version>$Id$</version> ! public class ValidationSummary : AbstractValidationControl { /// <summary> ! /// Create the default <see cref="DivValidationErrorsRenderer"/> ! /// for this ValidationControl if none is configured. /// </summary> ! protected override IValidationErrorsRenderer CreateValidationErrorsRenderer() { ! return new DivValidationErrorsRenderer(); } } Index: ValidationError.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Controls/ValidationError.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ValidationError.cs 26 Feb 2008 22:33:37 -0000 1.10 --- ValidationError.cs 19 Mar 2008 12:07:14 -0000 1.11 *************** *** 19,26 **** #endregion ! using System.Collections; ! using System.Web.UI; using Spring.Web.UI.Validation; namespace Spring.Web.UI.Controls { --- 19,28 ---- #endregion ! #region Imports ! using Spring.Web.UI.Validation; + #endregion + namespace Spring.Web.UI.Controls { *************** *** 31,121 **** /// <author>Jonathan Allenby</author> /// <version>$Id$</version> ! public class ValidationError : Control { - private string provider; - private IValidationErrorsRenderer renderer; - - /// <summary> - /// Gets or sets the provider. - /// </summary> - /// <value>The provider.</value> - public string Provider - { - get - { - if (this.provider == null) - { - return this.ID; - } - return this.provider; - } - set { this.provider = value; } - } - - /// <summary> - /// Gets or sets the validation errors renderer to use. - /// </summary> - /// <remarks> - /// If not explicitly specified, defaults to <see cref="SpanValidationErrorsRenderer"/>. - /// </remarks> - /// <value>The validation errors renderer to use.</value> - public IValidationErrorsRenderer Renderer - { - get - { - if (this.renderer == null) - { - this.renderer = new SpanValidationErrorsRenderer(); - } - return this.renderer; - } - set { this.renderer = value; } - } - - /// <summary> - /// Gets a reference to the <see cref="T:Spring.Web.UI.Page"/> instance that contains the - /// server control. - /// </summary> - /// <value></value> - new private Page Page - { - get { return base.Page as Page; } - } - /// <summary> ! /// Renders control. /// </summary> ! /// <param name="writer"></param> ! protected override void Render(HtmlTextWriter writer) { ! #if ! NET_2_0 ! bool DesignMode = this.Context == null; ! #endif ! if (!DesignMode) ! { ! if (Visible) ! { ! IList errorMessages; ! ! System.Type t = typeof(Spring.Web.UI.Page); ! #if NET_1_1 ! errorMessages = this.Page.ValidationErrors.GetResolvedErrors(this.Provider, this.Page.MessageSource); ! #else ! if (this.TemplateControl != null) t = this.TemplateControl.GetType(); ! ! if (t.IsSubclassOf(typeof(Spring.Web.UI.UserControl))) ! { ! Spring.Web.UI.UserControl container = (Spring.Web.UI.UserControl)this.TemplateControl as Spring.Web.UI.UserControl; ! errorMessages = container.ValidationErrors.GetResolvedErrors(this.Provider, container.MessageSource); ! } ! else ! { ! errorMessages = this.Page.ValidationErrors.GetResolvedErrors(this.Provider, this.Page.MessageSource); ! } ! #endif ! ! Renderer.RenderErrors(Page, writer, errorMessages); ! } ! } } } --- 33,45 ---- /// <author>Jonathan Allenby</author> /// <version>$Id$</version> ! public class ValidationError : AbstractValidationControl { /// <summary> ! /// Create the default <see cref="SpanValidationErrorsRenderer"/> ! /// for this ValidationControl if none is configured. /// </summary> ! protected override IValidationErrorsRenderer CreateValidationErrorsRenderer() { ! return new SpanValidationErrorsRenderer(); } } --- NEW FILE: AbstractValidationControl.cs --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/Controls In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv877/test/Spring/Spring.Web.Tests/Web/UI/Controls Added Files: AbstractValidationControlTests.cs ValidationErrorTests.cs ValidationErrorsTests.cs ValidationSummaryTests.cs Log Message: SPRNET-558, SPRNET-559 introduced new IValidationContainer interface --- NEW FILE: AbstractValidationControlTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ValidationErrorTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ValidationErrorsTests.cs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ValidationSummaryTests.cs --- (This appears to be a binary file; contents omitted.) |
From: Erich E. <oak...@us...> - 2008-03-19 12:07:21
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv877/src/Spring/Spring.Web/Web/UI Modified Files: MasterPage.cs Page.cs UserControl.cs Added Files: IValidationContainer.cs Log Message: SPRNET-558, SPRNET-559 introduced new IValidationContainer interface --- NEW FILE: IValidationContainer.cs --- (This appears to be a binary file; contents omitted.) Index: Page.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/Page.cs,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** Page.cs 5 Feb 2008 20:40:26 -0000 1.87 --- Page.cs 19 Mar 2008 12:07:15 -0000 1.88 *************** *** 75,79 **** [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class Page : System.Web.UI.Page, IHttpHandler, IApplicationContextAware, ISharedStateAware, IProcessAware, ! ISupportsWebDependencyInjection, IWebDataBound { #region Constants --- 75,79 ---- [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class Page : System.Web.UI.Page, IHttpHandler, IApplicationContextAware, ISharedStateAware, IProcessAware, ! ISupportsWebDependencyInjection, IWebDataBound, IValidationContainer { #region Constants *************** *** 1143,1147 **** /// </summary> /// <value>The validation errors container.</value> ! public IValidationErrors ValidationErrors { get { return validationErrors; } --- 1143,1147 ---- /// </summary> /// <value>The validation errors container.</value> ! public virtual IValidationErrors ValidationErrors { get { return validationErrors; } Index: UserControl.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/UserControl.cs,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** UserControl.cs 26 Feb 2008 19:06:11 -0000 1.51 --- UserControl.cs 19 Mar 2008 12:07:15 -0000 1.52 *************** *** 52,56 **** /// <author>Aleksandar Seovic</author> /// <version>$Id$</version> ! public class UserControl : System.Web.UI.UserControl, IApplicationContextAware, IWebDataBound, ISupportsWebDependencyInjection,IPostBackDataHandler { #region Static fields --- 52,57 ---- /// <author>Aleksandar Seovic</author> /// <version>$Id$</version> ! public class UserControl : System.Web.UI.UserControl, IApplicationContextAware, IWebDataBound, ISupportsWebDependencyInjection, ! IPostBackDataHandler,IValidationContainer { #region Static fields *************** *** 587,591 **** /// </summary> /// <value>The validation errors container.</value> ! public IValidationErrors ValidationErrors { get { return validationErrors; } --- 588,592 ---- /// </summary> /// <value>The validation errors container.</value> ! public virtual IValidationErrors ValidationErrors { get { return validationErrors; } Index: MasterPage.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/UI/MasterPage.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MasterPage.cs 1 Aug 2007 23:11:01 -0000 1.13 --- MasterPage.cs 19 Mar 2008 12:07:15 -0000 1.14 *************** *** 22,27 **** --- 22,31 ---- using System; + using System.Collections; + using System.Collections.Specialized; using System.Web.UI; + using Spring.Validation; using Spring.Web.UI.Controls; + using IValidator = Spring.Validation.IValidator; #if NET_2_0 *************** *** 96,104 **** /// <author>Aleksandar Seovic</author> /// <version>$Id$</version> ! public class MasterPage : System.Web.UI.MasterPage, IApplicationContextAware, ISupportsWebDependencyInjection { #region Instance Fields private ILocalizer localizer; private IMessageSource messageSource; private IApplicationContext applicationContext; --- 100,109 ---- /// <author>Aleksandar Seovic</author> /// <version>$Id$</version> ! public class MasterPage : System.Web.UI.MasterPage, IApplicationContextAware, ISupportsWebDependencyInjection, IValidationContainer { #region Instance Fields private ILocalizer localizer; + private IValidationErrors validationErrors = new ValidationErrors(); private IMessageSource messageSource; private IApplicationContext applicationContext; *************** *** 381,384 **** --- 386,464 ---- #endregion + #region Validation support + + /// <summary> + /// Evaluates specified validators and returns <c>True</c> if all of them are valid. + /// </summary> + /// <remarks> + /// <p> + /// Each validator can itself represent a collection of other validators if it is + /// an instance of <see cref="ValidatorGroup"/> or one of its derived types. + /// </p> + /// <p> + /// Please see the Validation Framework section in the documentation for more info. + /// </p> + /// </remarks> + /// <param name="validationContext">Object to validate.</param> + /// <param name="validators">Validators to evaluate.</param> + /// <returns> + /// <c>True</c> if all of the specified validators are valid, <c>False</c> otherwise. + /// </returns> + public bool Validate(object validationContext, params IValidator[] validators) + { + IDictionary contextParams = CreateValidatorParameters(); + bool result = true; + foreach (IValidator validator in validators) + { + if (validator == null) + { + throw new ArgumentException("Validator is not defined."); + } + result = validator.Validate(validationContext, contextParams, this.validationErrors) && result; + } + + return result; + } + + /// <summary> + /// Gets the validation errors container. + /// </summary> + /// <value>The validation errors container.</value> + public virtual IValidationErrors ValidationErrors + { + get { return validationErrors; } + } + + /// <summary> + /// Creates the validator parameters. + /// </summary> + /// <remarks> + /// <para> + /// This method can be overriden if you want to pass additional parameters + /// to the validation framework, but you should make sure that you call + /// this base implementation in order to add page, session, application, + /// request, response and context to the variables collection. + /// </para> + /// </remarks> + /// <returns> + /// Dictionary containing parameters that should be passed to + /// the data validation framework. + /// </returns> + protected virtual IDictionary CreateValidatorParameters() + { + IDictionary parameters = new ListDictionary(); + parameters["page"] = this.Page; + parameters["usercontrol"] = this; + parameters["session"] = this.Session; + parameters["application"] = this.Application; + parameters["request"] = this.Request; + parameters["response"] = this.Response; + parameters["context"] = this.Context; + + return parameters; + } + + #endregion + #region Spring Page support |
From: Erich E. <oak...@us...> - 2008-03-19 12:07:21
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv877/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2005.csproj Log Message: SPRNET-558, SPRNET-559 introduced new IValidationContainer interface 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.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Spring.Web.Tests.2005.csproj 15 Mar 2008 11:19:39 -0000 1.30 --- Spring.Web.Tests.2005.csproj 19 Mar 2008 12:07:15 -0000 1.31 *************** *** 110,114 **** --- 110,117 ---- <SubType>Code</SubType> </Compile> + <Compile Include="Web\UI\Controls\AbstractValidationControlTests.cs" /> <Compile Include="Web\UI\Controls\HeadTests.cs" /> + <Compile Include="Web\UI\Controls\ValidationErrorsTests.cs" /> + <Compile Include="Web\UI\Controls\ValidationSummaryTests.cs" /> <Compile Include="Web\UI\PageTests.cs"> </Compile> |
From: Erich E. <oak...@us...> - 2008-03-19 12:02:52
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/SpringAir.Web.2005 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32453/SpringAir.Web.2005 Log Message: Directory /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/SpringAir.Web.2005 added to the repository |
From: Erich E. <oak...@us...> - 2008-03-17 22:04:55
|
Update of /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005/Web In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9110 Modified Files: StandardTemplate.master Log Message: fixed SPRNET-831 Index: StandardTemplate.master =================================================================== RCS file: /cvsroot/springnet/Spring.Net/examples/Spring/SpringAir/src/SpringAir.Web.2005/Web/StandardTemplate.master,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StandardTemplate.master 1 Nov 2006 02:44:45 -0000 1.1 --- StandardTemplate.master 17 Mar 2008 22:04:50 -0000 1.2 *************** *** 1,12 **** <%@ Master Language="C#" AutoEventWireup="false" CodeFile="StandardTemplate.master.cs" Inherits="StandardTemplate" %> ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > ! <html> ! <spring:Head runat="server"> <title><%= GetMessage("default.title") %></title> <link href="<%= Page.CssRoot %>/default.css" type="text/css" rel="stylesheet" /> ! <asp:ContentPlaceHolder id="head" runat="server" /> ! </spring:Head> <body> <form id="form" method="post" runat="server"> --- 1,14 ---- <%@ Master Language="C#" AutoEventWireup="false" CodeFile="StandardTemplate.master.cs" Inherits="StandardTemplate" %> ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ! <html> ! <head runat="server"> <title><%= GetMessage("default.title") %></title> <link href="<%= Page.CssRoot %>/default.css" type="text/css" rel="stylesheet" /> ! <spring:Head ID="Head1" runat="server"> ! <asp:ContentPlaceHolder id="head" runat="server" /> ! </spring:Head> ! </head> <body> <form id="form" method="post" runat="server"> |
From: Mark P. <mar...@us...> - 2008-03-17 20:25:44
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3811 Modified Files: RetryAdviceTests.cs Log Message: Fix for SPRNET-893 - Retry advice goes into infinite loop when exception type not listed in advice is thrown Index: RetryAdviceTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/RetryAdviceTests.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RetryAdviceTests.cs 10 Oct 2007 07:38:25 -0000 1.2 --- RetryAdviceTests.cs 17 Mar 2008 20:25:41 -0000 1.3 *************** *** 52,55 **** --- 52,61 ---- } + [Test] + public void TestUnexpectedException() + { + InvokeOnceFailWithUnexceptedException(false, false); + } + private static void InvokeOncePassOnceFail(bool useExceptionName, bool isDelay) { *************** *** 68,71 **** --- 74,90 ---- } } + private static void InvokeOnceFailWithUnexceptedException(bool useExceptionName, bool isDelay) + { + ITestRemoteService rs = GetRemoteService(3, useExceptionName, isDelay); + try + { + rs.DoTransfer2(); + Assert.Fail("Should have failed."); + } + catch (ArgumentException) + { + + } + } private static ITestRemoteService GetRemoteService(int numFailures, bool usingExceptionName, bool isDelay) *************** *** 108,111 **** --- 127,131 ---- { void DoTransfer(); + void DoTransfer2(); } *************** *** 114,118 **** private int numFailures; private int count = 0; ! private bool throwException = false; public int NumFailures --- 134,139 ---- private int numFailures; private int count = 0; ! private bool throwArithmeticException = false; ! public int NumFailures *************** *** 122,126 **** } ! public bool ThrowException { get --- 143,147 ---- } ! public bool ThrowArithmeticException { get *************** *** 134,150 **** else { ! return throwException; } } ! set { throwException = value; } } public void DoTransfer() { ! if (ThrowException) { throw new ArithmeticException("can't do the math"); } } } } \ No newline at end of file --- 155,176 ---- else { ! return throwArithmeticException; } } ! set { throwArithmeticException = value; } } public void DoTransfer() { ! if (ThrowArithmeticException) { throw new ArithmeticException("can't do the math"); } } + + public void DoTransfer2() + { + throw new ArgumentException("bad argument"); + } } } \ No newline at end of file |
From: Mark P. <mar...@us...> - 2008-03-17 20:25:38
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3800 Modified Files: RetryAdvice.cs Log Message: Fix for SPRNET-893 - Retry advice goes into infinite loop when exception type not listed in advice is thrown Index: RetryAdvice.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RetryAdvice.cs 29 Jan 2008 18:27:37 -0000 1.4 --- RetryAdvice.cs 17 Mar 2008 20:25:34 -0000 1.5 *************** *** 156,159 **** --- 156,163 ---- } } + else + { + throw; + } } } while (numAttempts <= retryExceptionHandler.MaximumRetryCount); |
From: Erich E. <oak...@us...> - 2008-03-15 11:19:45
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29101/test/Spring/Spring.Web.Tests/TestSupport Modified Files: TestPage.cs TestWebContext.cs Added Files: TestWebContextTests.cs Log Message: introduced TestWebContextTests base class for unit testing web objects (Page,UserControl etc.) added validation related tests --- NEW FILE: TestWebContextTests.cs --- (This appears to be a binary file; contents omitted.) Index: TestPage.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestPage.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestPage.cs 28 Nov 2007 23:40:14 -0000 1.2 --- TestPage.cs 15 Mar 2008 11:19:39 -0000 1.3 *************** *** 40,47 **** } ! protected override IDictionary CreateValidatorParameters() { ! return null; } public new void SetResult(string resultName) --- 40,54 ---- } ! public override System.Web.SessionState.HttpSessionState Session { ! get ! { ! return null; ! } } + // protected override IDictionary CreateValidatorParameters() + // { + // return null; + // } public new void SetResult(string resultName) Index: TestWebContext.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/TestSupport/TestWebContext.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestWebContext.cs 14 Mar 2008 12:02:46 -0000 1.5 --- TestWebContext.cs 15 Mar 2008 11:19:39 -0000 1.6 *************** *** 36,39 **** --- 36,53 ---- private readonly TextWriter _out; private readonly HttpWorkerRequest _wr; + [ThreadStatic] private static TestWebContext _wc; + + public static void Create(string virtualPath, string page) + { + _wc = new TestWebContext(virtualPath, page); + } + + public static void Release() + { + if (_wc != null) + { + _wc.Dispose(); + } + } public TestWebContext(string virtualPath, string page) |
From: Erich E. <oak...@us...> - 2008-03-15 11:19:45
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29101/test/Spring/Spring.Web.Tests/Web/UI Modified Files: PageTests.cs UserControlTests.cs Log Message: introduced TestWebContextTests base class for unit testing web objects (Page,UserControl etc.) added validation related tests Index: PageTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/PageTests.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PageTests.cs 2 Feb 2008 09:12:45 -0000 1.6 --- PageTests.cs 15 Mar 2008 11:19:39 -0000 1.7 *************** *** 25,28 **** --- 25,29 ---- using System.Globalization; using System.Threading; + using System.Web; using NUnit.Framework; using Rhino.Mocks; *************** *** 45,67 **** /// <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() { ! 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); --- 46,55 ---- /// <version>$Id$</version> [TestFixture] ! public class PageTests : TestWebContextTests { [Test] public void Validate() { ! Page page = new TestPage(HttpContext.Current); IValidator[] validators = new IValidator[] {new RequiredValidator("Name", null), new ConditionValidator("Loan == 0", "Age > 21")}; Contact contact = new Contact("Goran", 24, 0); Index: UserControlTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Web/UI/UserControlTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserControlTests.cs 2 Feb 2008 10:24:39 -0000 1.1 --- UserControlTests.cs 15 Mar 2008 11:19:39 -0000 1.2 *************** *** 21,31 **** #region Imports - using System; using System.Web; using System.Web.UI; - using System.Web.UI.HtmlControls; using NUnit.Framework; using Rhino.Mocks; ! using Spring.Util; using Spring.Web.Support; --- 21,30 ---- #region Imports using System.Web; using System.Web.UI; using NUnit.Framework; using Rhino.Mocks; ! using Spring.TestSupport; ! using Spring.Validation; using Spring.Web.Support; *************** *** 40,44 **** /// <version>$Id$</version> [TestFixture] ! public class UserControlTests { public class TestUserControl : UserControl --- 39,43 ---- /// <version>$Id$</version> [TestFixture] ! public class UserControlTests : TestWebContextTests { public class TestUserControl : UserControl *************** *** 86,90 **** Result theResult = (Result)mocks.CreateMock(typeof(Result)); ! using(mocks.Ordered()) { theResult.Navigate(c1); --- 85,89 ---- Result theResult = (Result)mocks.CreateMock(typeof(Result)); ! using (mocks.Ordered()) { theResult.Navigate(c1); *************** *** 97,100 **** --- 96,111 ---- } + [Test] + public void ValidateSetsDefaultVariables() + { + TestPage page = new TestPage(HttpContext.Current); + TestUserControl c1 = new TestUserControl(); + page.Controls.Add(c1); + + ConditionValidator v1 = new ConditionValidator("#page == #this.Page", null); + ConditionValidator v2 = new ConditionValidator("#usercontrol == #this", null); + + Assert.IsTrue(c1.Validate(c1, v1, v2)); + } } } \ No newline at end of file |
From: Erich E. <oak...@us...> - 2008-03-15 11:19:45
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29101/src/Spring/Spring.Core Modified Files: Spring.Core.2005.csproj Log Message: introduced TestWebContextTests base class for unit testing web objects (Page,UserControl etc.) added validation related tests Index: Spring.Core.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Spring.Core.2005.csproj,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** Spring.Core.2005.csproj 5 Feb 2008 21:38:49 -0000 1.116 --- Spring.Core.2005.csproj 15 Mar 2008 11:19:38 -0000 1.117 *************** *** 1035,1038 **** --- 1035,1041 ---- </EmbeddedResource> <None Include="Spring.Core.build" /> + <None Include="Validation\Config\spring-validation-1.1.xsx"> + <DependentUpon>spring-validation-1.1.xsd</DependentUpon> + </None> <EmbeddedResource Include="Validation\Config\spring-validation-1.1.xsd"> <SubType>Designer</SubType> |
From: Erich E. <oak...@us...> - 2008-03-15 11:19:45
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29101/test/Spring/Spring.Web.Tests Modified Files: Spring.Web.Tests.2005.csproj Log Message: introduced TestWebContextTests base class for unit testing web objects (Page,UserControl etc.) added validation related tests Index: Spring.Web.Tests.2005.csproj =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Spring.Web.Tests.2005.csproj,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Spring.Web.Tests.2005.csproj 2 Feb 2008 10:24:38 -0000 1.29 --- Spring.Web.Tests.2005.csproj 15 Mar 2008 11:19:39 -0000 1.30 *************** *** 93,96 **** --- 93,97 ---- </Compile> <Compile Include="TestSupport\TestWebContext.cs" /> + <Compile Include="TestSupport\TestWebContextTests.cs" /> <Compile Include="TestSupport\VirtualEnvironmentMock.cs" /> <Compile Include="TestSupport\VoidDelegate.cs" /> |
From: Erich E. <oak...@us...> - 2008-03-14 12:02:51
|
Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Objects/Factory/Support In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23167/test/Spring/Spring.Web.Tests/Objects/Factory/Support Modified Files: WebObjectDefinitionFactoryTests.cs WebObjectFactoryTests.cs Log Message: fixed SPRNET-872 Index: WebObjectDefinitionFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Objects/Factory/Support/WebObjectDefinitionFactoryTests.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WebObjectDefinitionFactoryTests.cs 27 Jan 2008 23:29:55 -0000 1.3 --- WebObjectDefinitionFactoryTests.cs 14 Mar 2008 12:02:45 -0000 1.4 *************** *** 22,29 **** using System; - using System.Web; using NUnit.Framework; using NUnitAspEx; ! using Spring.Objects.Factory.Config; #endregion --- 22,28 ---- using System; using NUnit.Framework; using NUnitAspEx; ! using Spring.TestSupport; #endregion Index: WebObjectFactoryTests.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Web.Tests/Objects/Factory/Support/WebObjectFactoryTests.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WebObjectFactoryTests.cs 16 Dec 2007 12:43:56 -0000 1.4 --- WebObjectFactoryTests.cs 14 Mar 2008 12:02:45 -0000 1.5 *************** *** 25,29 **** using Spring.Objects.Factory.Config; using Spring.TestSupport; - using Spring.Web.TestSupport; #endregion --- 25,28 ---- *************** *** 47,51 **** // we need to create WOF within a valid HttpContext environment 'cause we will // make use of 'request' and 'session' scope. ! using (new VirtualEnvironmentMock("/somedir/some.file", "/", true)) { wof = new WebObjectFactory("/somedir/", false); --- 46,50 ---- // we need to create WOF within a valid HttpContext environment 'cause we will // make use of 'request' and 'session' scope. ! using (new VirtualEnvironmentMock("/somedir/some.file", null, "/", true)) { wof = new WebObjectFactory("/somedir/", false); |
From: Erich E. <oak...@us...> - 2008-03-14 12:02:51
|
Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Core/IO In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23167/src/Spring/Spring.Web/Core/IO Modified Files: WebResource.cs Log Message: fixed SPRNET-872 Index: WebResource.cs =================================================================== RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Core/IO/WebResource.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** WebResource.cs 8 Aug 2007 17:49:48 -0000 1.13 --- WebResource.cs 14 Mar 2008 12:02:45 -0000 1.14 *************** *** 85,89 **** if(!this.absolutePath.StartsWith("/")) { ! string currentPath = VirtualEnvironment.CurrentVirtualPath; int n = currentPath.LastIndexOfAny(new char[] {'/', '\\'}); if(n >= 0) --- 85,89 ---- if(!this.absolutePath.StartsWith("/")) { ! string currentPath = VirtualEnvironment.CurrentVirtualFilePath; int n = currentPath.LastIndexOfAny(new char[] {'/', '\\'}); if(n >= 0) |