You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(248) |
May
(82) |
Jun
(90) |
Jul
(177) |
Aug
(253) |
Sep
(157) |
Oct
(151) |
Nov
(143) |
Dec
(278) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(152) |
Feb
(107) |
Mar
(177) |
Apr
(133) |
May
(259) |
Jun
(81) |
Jul
(119) |
Aug
(306) |
Sep
(416) |
Oct
(240) |
Nov
(329) |
Dec
(206) |
2006 |
Jan
(466) |
Feb
(382) |
Mar
(153) |
Apr
(162) |
May
(133) |
Jun
(21) |
Jul
(18) |
Aug
(37) |
Sep
(97) |
Oct
(114) |
Nov
(110) |
Dec
(28) |
2007 |
Jan
(74) |
Feb
(65) |
Mar
(49) |
Apr
(76) |
May
(43) |
Jun
(15) |
Jul
(68) |
Aug
(55) |
Sep
(63) |
Oct
(59) |
Nov
(70) |
Dec
(66) |
2008 |
Jan
(71) |
Feb
(60) |
Mar
(120) |
Apr
(31) |
May
(48) |
Jun
(81) |
Jul
(107) |
Aug
(51) |
Sep
(80) |
Oct
(83) |
Nov
(83) |
Dec
(79) |
2009 |
Jan
(83) |
Feb
(110) |
Mar
(97) |
Apr
(91) |
May
(291) |
Jun
(250) |
Jul
(197) |
Aug
(58) |
Sep
(54) |
Oct
(122) |
Nov
(68) |
Dec
(34) |
2010 |
Jan
(50) |
Feb
(17) |
Mar
(63) |
Apr
(61) |
May
(84) |
Jun
(81) |
Jul
(138) |
Aug
(144) |
Sep
(78) |
Oct
(26) |
Nov
(30) |
Dec
(61) |
2011 |
Jan
(33) |
Feb
(35) |
Mar
(166) |
Apr
(221) |
May
(109) |
Jun
(76) |
Jul
(27) |
Aug
(37) |
Sep
(1) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(1) |
2014 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:26
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040/src/Nullables Modified Files: AssemblyInfo.cs Log Message: initial check-in of SysCache currently unable to fully test, as Clover.NET license and SQL Server are not on current workstation Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/AssemblyInfo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AssemblyInfo.cs 6 Dec 2004 03:16:51 -0000 1.2 --- AssemblyInfo.cs 7 Dec 2004 19:59:16 -0000 1.3 *************** *** 5,9 **** // <autogenerated> // This code was generated by a tool. ! // Runtime Version: 1.1.4322.573 // // Changes to this file may cause incorrect behavior and will be lost if --- 5,9 ---- // <autogenerated> // This code was generated by a tool. ! // Runtime Version: 1.1.4322.2032 // // Changes to this file may cause incorrect behavior and will be lost if *************** *** 20,23 **** [assembly: AssemblyInformationalVersionAttribute("0.5")] [assembly: AssemblyFileVersionAttribute("0.5.0.0")] - //[assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] --- 20,22 ---- |
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:25
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040/src/BantamTech.SysCache Added Files: AssemblyInfo.cs BantamTech.SysCache-1.1.csproj BantamTech.SysCache.Tests-1.1.csproj SysCache.cs SysCacheFixture.cs SysCacheProvider.cs SysCacheProviderFixture.cs syscache.build syscache.config syscache.nunit Log Message: initial check-in of SysCache currently unable to fully test, as Clover.NET license and SQL Server are not on current workstation --- NEW FILE: syscache.config --- <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> </configSections> <nhibernate> <!-- <add key="hibernate.connection.pool_size" value="2" /> <add key="hibernate.use_outer_join" value="false" /> --> <!-- The valid strings for Isolation can be found in the documentation for the System.Data.IsolationLevel Enumeration documentation. Use the member names - not the values. --> <!--add key="hibernate.connection.isolation" value="ReadCommitted" /--> <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" /> <add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" /> <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" /> <add key="hibernate.connection.connection_string" value="Server=localhost;initial catalog=pubs;Integrated Security=SSPI" /> <add key="hibernate.cache.provider_class" value="BantamTech.SysCache.SysCacheProvider,BantamTech.SysCache" /> <add key="hibernate.cache.use_query_cache" value="true" /> </nhibernate> <log4net> <appender name="myFile" type="log4net.Appender.FileAppender,log4net" > <param name="File" value="log.txt" /> <param name="AppendToFile" value="false" /> <layout type="log4net.Layout.PatternLayout,log4net"> <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] <%X{auth}> - %m%n" /> </layout> </appender> <root> <priority value="DEBUG" /> <appender-ref ref="myFile" /> </root> <logger name="NHibernate"> <level value="WARN" /> </logger> </log4net> </configuration> --- NEW FILE: SysCacheProviderFixture.cs --- #region License // // SysCache - A cache provider for NHibernate using System.Web.Caching.Cache. // Copyright (C) 2004 Bantam Technologies, LLC // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $URL: svn://www.bantamtech.com/syscache/trunk/src/SysCacheProviderFixture.cs $ // $Id: SysCacheProviderFixture.cs,v 1.1 2004/12/07 19:59:16 kevinwilliams Exp $ // #endregion using System; using System.Collections; using NHibernate.Cache; using NUnit.Framework; namespace BantamTech.SysCache.Tests { [TestFixture] public class SysCacheProviderFixture { private ICacheProvider provider; private Hashtable props; [TestFixtureSetUp] public void FixtureSetup() { log4net.Config.DOMConfigurator.Configure(); props = new Hashtable(); props.Add( "staticExpiration", DateTime.Parse( "1/1/3000" ) ); props.Add( "priority", 2 ); } [SetUp] public void Setup() { provider = new SysCacheProvider(); } [Test] public void TestBuildCacheNullNull() { ICache cache = provider.BuildCache( null, null ); Assert.IsNotNull( cache, "no cache returned" ); } [Test] public void TestBuildCacheStringNull() { ICache cache = provider.BuildCache( "a_region", null ); Assert.IsNotNull( cache, "no cache returned" ); } [Test] public void TestBuildCacheStringICollection() { ICache cache = provider.BuildCache( "another_region", props ); Assert.IsNotNull( cache, "no cache returned" ); } [Test] public void TestNextTimestamp() { long ts = provider.NextTimestamp(); Assert.IsNotNull( ts, "no timestamp returned" ); } } } --- NEW FILE: BantamTech.SysCache.Tests-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{53E01216-76B6-4920-A386-2486ACEE5AEA}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "BantamTech.SysCache.Tests" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "BantamTech.SysCache.Tests" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "syscache" Project = "{21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}" Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> <Reference Name = "nunit.framework" AssemblyName = "nunit.framework" HintPath = "..\..\lib\net\1.1\nunit.framework.dll" /> <Reference Name = "log4net" AssemblyName = "log4net" HintPath = "..\..\lib\net\1.1\log4net.dll" /> <Reference Name = "NHibernate" AssemblyName = "NHibernate" HintPath = "..\..\lib\net\1.1\NHibernate.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "syscache.nunit" BuildAction = "None" /> <File RelPath = "SysCacheFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SysCacheProviderFixture.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: AssemblyInfo.cs --- using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Permissions; //------------------------------------------------------------------------------ // <autogenerated> // This code was generated by a tool. // Runtime Version: 1.1.4322.2032 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> //------------------------------------------------------------------------------ [assembly: AssemblyTitleAttribute("BantamTech.SysCache for Microsoft .NET Framework 1.1")] [assembly: AssemblyDescriptionAttribute("Cache provider for NHibernate using ASP.NET Cache object.")] [assembly: AssemblyCompanyAttribute("nhibernate.sourceforge.net")] [assembly: AssemblyProductAttribute("BantamTech.SysCache")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyVersionAttribute("0.5.0.0")] [assembly: AssemblyInformationalVersionAttribute("0.5")] --- NEW FILE: syscache.nunit --- <NUnitProject> <Settings activeconfig="Debug"/> <Config name="Debug"> <assembly path="bin\Debug\BantamTech.SysCache.Tests.dll"/> </Config> <Config name="Release"> <assembly path="bin\Release\BantamTech.SysCache.Tests.dll"/> </Config> </NUnitProject> --- NEW FILE: SysCacheFixture.cs --- #region License // // SysCache - A cache provider for NHibernate using System.Web.Caching.Cache. // Copyright (C) 2004 Bantam Technologies, LLC // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $URL: svn://www.bantamtech.com/syscache/trunk/src/SysCacheFixture.cs $ // $Id: SysCacheFixture.cs,v 1.1 2004/12/07 19:59:16 kevinwilliams Exp $ // #endregion using System; using System.Collections; using NHibernate.Cache; using NUnit.Framework; namespace BantamTech.SysCache.Tests { [TestFixture] public class SysCacheFixture { private SysCacheProvider provider; private Hashtable props; [TestFixtureSetUp] public void FixtureSetup() { log4net.Config.DOMConfigurator.Configure(); props = new Hashtable(); props.Add( "relativeExpiration", 120 ); props.Add( "priority", 4 ); provider = new SysCacheProvider(); } [Test] public void TestPut() { string key = "key1"; string value = "value"; ICache cache = provider.BuildCache( "nunit", props ); Assert.IsNotNull( cache, "no cache returned" ); Assert.IsNull( cache.Get( key ), "cache returned an item we didn't add !?!" ); cache.Put( key, value ); object item = cache.Get( key ); Assert.IsNotNull( item ); Assert.AreEqual( value, item, "didn't return the item we added" ); } [Test] public void TestRemove() { string key = "key1"; string value = "value"; ICache cache = provider.BuildCache( "nunit", props ); Assert.IsNotNull( cache, "no cache returned" ); // add the item cache.Put( key, value ); // make sure it's there object item = cache.Get( key ); Assert.IsNotNull( item, "item just added is not there" ); // remove it cache.Remove( key ); // make sure it's not there item = cache.Get( key ); Assert.IsNull( item, "item still exists in cache" ); } [Test] public void TestClear() { string key = "key1"; string value = "value"; ICache cache = provider.BuildCache( "nunit", props ); Assert.IsNotNull( cache, "no cache returned" ); // add the item cache.Put( key, value ); // make sure it's there object item = cache.Get( key ); Assert.IsNotNull( item, "couldn't find item in cache" ); // clear the cache cache.Clear(); // make sure we don't get an item item = cache.Get( key ); Assert.IsNull( item, "item still exists in cache" ); } [Test] public void TestDefaultConstructor() { ICache cache = new SysCache(); Assert.IsNotNull( cache ); } [Test] public void TestNoPropertiesConstructor() { ICache cache = new SysCache( "nunit" ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( IndexOutOfRangeException ) )] public void TestPriorityOutOfRange() { Hashtable h = new Hashtable(); h.Add( "priority", 7 ); ICache cache = new SysCache( "nunit", h ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( NotSupportedException ) )] public void TestDoubleException() { Hashtable h = new Hashtable(); h.Add( "staticExpiration", DateTime.Now ); h.Add( "relativeExpiration", 300 ); ICache cache = new SysCache( "nunit", h ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( ArgumentOutOfRangeException ) )] public void TestHistoricStaticExpiration() { Hashtable h = new Hashtable(); h.Add( "staticExpiration", DateTime.Parse( "1/1/1980") ); ICache cache = new SysCache( "nunit", h ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( ArgumentException ) )] public void TestBadStaticExpiration() { Hashtable h = new Hashtable(); h.Add( "staticExpiration", "foobar" ); ICache cache = new SysCache( "nunit", h ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( ArgumentException ) )] public void TestBadRelativeExpiration() { Hashtable h = new Hashtable(); h.Add( "relativeExpiration", "foobar" ); ICache cache = new SysCache( "nunit", h ); Assert.IsNotNull( cache ); } [Test] public void TestEmptyProperties() { ICache cache = new SysCache( "nunit", new Hashtable() ); Assert.IsNotNull( cache ); } [Test] [ExpectedException( typeof( ArgumentNullException ) )] public void TestNullKeyPut() { ICache cache = new SysCache(); cache.Put( null, null ); } [Test] [ExpectedException( typeof( ArgumentNullException ) )] public void TestNullValuePut() { ICache cache = new SysCache(); cache.Put( "nunit", null ); } [Test] public void TestNullKeyGet() { ICache cache = new SysCache(); cache.Put( "nunit", "value" ); object item = cache.Get( null ); Assert.IsNull( item ); } [Test] [ExpectedException( typeof( ArgumentNullException ) )] public void TestNullKeyRemove() { ICache cache = new SysCache(); cache.Remove( null ); } } } --- NEW FILE: SysCache.cs --- #region License // // SysCache - A cache provider for NHibernate using System.Web.Caching.Cache. // Copyright (C) 2004 Bantam Technologies, LLC // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $URL: svn://www.bantamtech.com/syscache/trunk/src/SysCache.cs $ // $Id: SysCache.cs,v 1.1 2004/12/07 19:59:16 kevinwilliams Exp $ // #endregion using System; using System.Collections; using System.Web; using System.Web.Caching; using log4net; using NHibernate.Cache; namespace BantamTech.SysCache { /// <summary> /// Pluggable cache implementation using the System.Web.Caching classes /// </summary> public class SysCache : ICache { private static readonly ILog log = LogManager.GetLogger( typeof( SysCache ) ); private string _region; private Cache _cache; private DateTime _absExpiration; private TimeSpan _slidingExpiration; private CacheItemPriority _priority; private Hashtable _map; private static readonly TimeSpan _defaultRelativeExpiration = TimeSpan.FromSeconds( 300 ); /// <summary> /// default constructor /// </summary> public SysCache() : this( null, null ) { } /// <summary> /// constructor with no properties /// </summary> /// <param name="region"></param> public SysCache( string region ) : this( region, null ) { } /// <summary> /// full constructor /// </summary> /// <param name="region"></param> /// <param name="properties">cache configuration properties</param> /// <remarks> /// There are three (3) configurable parameters: /// <ul> /// <li>staticExpiration = a specific DateTime to expire each item on</li> /// <li>relativeExpiration = number of seconds to wait before expiring each item</li> /// <li>priority = a numeric cost of expiring each item, where 1 is a low cost, 5 is the highest, and 3 is normal. Only values 1 through 5 are valid.</li> /// </ul> /// staticExpiration and relativeExpiration are exclusive - you can only specify one or the other, not both. /// All parameters are optional. The defaults are a relativeExpiration of 300 seconds and the default priority of 3. /// </remarks> /// <exception cref="IndexOutOfRangeException">The "priority" property is not between 1 and 5</exception> /// <exception cref="NotSupportedException">"staticExpiration" and "relativeExpiration" properties were both specified.</exception> /// <exception cref="ArgumentOutOfRangeException">The "staticExpiration" property is not in the future.</exception> /// <exception cref="ArgumentException">The "relativeExpiration" property could not be parsed.</exception> public SysCache( string region, IDictionary properties ) { _region = region; _map = new Hashtable(); _cache = HttpRuntime.Cache; Configure( properties ); } private void Configure( IDictionary props ) { if( props == null ) { if( log.IsDebugEnabled ) { log.Debug( "configuring cache with default values" ); } _absExpiration = Cache.NoAbsoluteExpiration; _slidingExpiration = _defaultRelativeExpiration; _priority = CacheItemPriority.Default; } else { if( props["priority"] != null ) { int priority = Convert.ToInt32( props["priority"] ); if( priority < 1 || priority > 5 ) { if( log.IsWarnEnabled ) { log.Warn( "priority value out of range: " + priority.ToString() ); } throw new IndexOutOfRangeException( "priority must be between 1 and 5" ); } _priority = (CacheItemPriority)priority; if( log.IsDebugEnabled ) { log.Debug( "new priority: " + _priority.ToString() ); } } else { _priority = CacheItemPriority.Default; } if( props["relativeExpiration"] == null && props["staticExpiration"] == null ) { if( log.IsDebugEnabled ) { log.Debug( "no expiration values given, using defaults" ); } _absExpiration = Cache.NoAbsoluteExpiration; _slidingExpiration = _defaultRelativeExpiration; return; } if( props["relativeExpiration"] != null && props["staticExpiration"] != null ) { if( log.IsWarnEnabled ) { log.Warn( "both expiration types specified" ); } throw new NotSupportedException( "staticExpiration and relativeExpiration are exclusive - specify one or the other, not both." ); } if( props["relativeExpiration"] == null && props["staticExpiration"] != null ) { DateTime exp; if( props["staticExpiration"] is DateTime ) { exp = (DateTime)props["staticExpiration"]; } else { try { exp = DateTime.Parse( props["staticExpiration"].ToString() ); } catch( Exception ex ) { if( log.IsWarnEnabled ) { log.Warn( "could not parse static expiration" ); } throw new ArgumentException( "could not parse as DateTime", "staticExpiration", ex ); } } if( exp > DateTime.Now ) { _absExpiration = exp; if( log.IsDebugEnabled ) { log.Debug( "new static expiration value: " + _absExpiration.ToString() ); } } else { if( log.IsWarnEnabled ) { log.Warn( "static expiration not a future time or date" ); } throw new ArgumentOutOfRangeException( "staticExpiration", exp.ToString(), "staticExpiration must be in the future" ); } _slidingExpiration = _defaultRelativeExpiration; } else { _absExpiration = Cache.NoAbsoluteExpiration; try { int seconds = Convert.ToInt32( props["relativeExpiration"] ); _slidingExpiration = TimeSpan.FromSeconds( seconds ); if( log.IsDebugEnabled ) { log.Debug( "new relative expiration value: " + seconds.ToString() ); } } catch( Exception ex ) { if( log.IsWarnEnabled ) { log.Warn( "error parsing relative expiration value" ); } throw new ArgumentException( "could not parse relativeException as a number of seconds", "relativeException", ex ); } } } } /// <summary></summary> /// <param name="key"></param> /// <returns></returns> public object Get( object key ) { if( key == null ) { return null; } return _cache.Get( key.ToString() ); } /// <summary></summary> /// <param name="key"></param> /// <param name="value"></param> public void Put( object key, object value ) { if( key == null ) { throw new ArgumentNullException( "key", "null key not allowed" ); } if( value == null ) { throw new ArgumentNullException( "value", "null value not allowed" ); } if( _cache[key.ToString()] != null ) { if( log.IsDebugEnabled ) { log.Debug( "updating value of key '" + key.ToString() + "' to: " + value.ToString() ); } _cache[key.ToString()] = value; } else { if( log.IsDebugEnabled ) { log.Debug( "adding new data: key=" + key.ToString() + "&value=" + value.ToString() ); } _map.Add( key.ToString(), value ); _cache.Add( key.ToString(), value, null, _absExpiration, _slidingExpiration, _priority, null ); } } /// <summary></summary> /// <param name="key"></param> public void Remove( object key ) { if( key == null ) { throw new ArgumentNullException( "key" ); } _map.Remove( key.ToString() ); _cache.Remove( key.ToString() ); } /// <summary></summary> public void Clear() { foreach( DictionaryEntry entry in _map ) { _cache.Remove( entry.Key.ToString() ); } _map.Clear(); } /// <summary></summary> public void Destroy() { Clear(); } /// <summary></summary> public string Region { set { _region = value; } } } } --- NEW FILE: SysCacheProvider.cs --- #region License // // SysCache - A cache provider for NHibernate using System.Web.Caching.Cache. // Copyright (C) 2004 Bantam Technologies, LLC // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // $URL: svn://www.bantamtech.com/syscache/trunk/src/SysCacheProvider.cs $ // $Id: SysCacheProvider.cs,v 1.1 2004/12/07 19:59:16 kevinwilliams Exp $ // #endregion using System; using System.Collections; using System.Text; using log4net; using NHibernate.Cache; namespace BantamTech.SysCache { /// <summary> /// Cache provider using the System.Web.Caching classes /// </summary> public class SysCacheProvider : ICacheProvider { private static readonly ILog log = LogManager.GetLogger( typeof( SysCacheProvider ) ); /// <summary> /// build a new SysCache /// </summary> /// <param name="regionName"></param> /// <param name="properties"></param> /// <returns></returns> [CLSCompliant(false)] public ICache BuildCache( string regionName, IDictionary properties ) { if( log.IsDebugEnabled ) { if( regionName == null ) { regionName = ""; } if( properties == null ) { properties = new Hashtable(); } StringBuilder sb = new StringBuilder(); foreach( DictionaryEntry de in properties ) { sb.Append( "name=" ); sb.Append( de.Key.ToString() ); sb.Append( "&value=" ); sb.Append( de.Value.ToString() ); sb.Append( ";" ); } log.Debug( "building cache with region: " + regionName + ", properties: " + sb.ToString() ); } return new SysCache( regionName, properties ); } /// <summary></summary> /// <returns></returns> public long NextTimestamp() { return Timestamper.Next(); } } } --- NEW FILE: BantamTech.SysCache-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "BantamTech.SysCache" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "BantamTech.SysCache" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "BantamTech.SysCache.xml" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "BantamTech.SysCache.xml" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "System.Web" AssemblyName = "System.Web" HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Web.dll" /> <Reference Name = "NHibernate" AssemblyName = "NHibernate" HintPath = "..\..\lib\net\1.1\NHibernate.dll" /> <Reference Name = "log4net" AssemblyName = "log4net" HintPath = "..\..\lib\net\1.1\log4net.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SysCache.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SysCacheProvider.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: syscache.build --- <?xml version="1.0"?> <project name="BantamTech.SysCache" default="build" description="NHibernate pluggable cache provider using ASP.NET Cache object" xmlns="http://nant.sourceforge.net/schemas/nant-0.84.win32.net-1.0.xsd"> <!-- Required properties: * build.dir - (path) root level to build to, assemblies will go in ${build.dir}/bin * build.debug - (true|false) debug build? * current.build.defines - framework-specific build defines * project.version - full project version * project.version.major - the major number of the build * project.version.minor - the minor number of the build * project.version.build - the build number * sign - (true|false)indicates if the Assembly should be signed. * clover.enabled - (true|false) indicates if Clover.NET should handle the build * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib * clover.db - location of the coverage db from the root of NHibernateContrib --> <!--if propertytrue="clover.enabled"> <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> </if--> <property name="keyFile" value="..\NHibernate.snk" /> <target name="build"> <attrib file="AssemblyInfo.cs" readonly="false" /> <asminfo output="AssemblyInfo.cs" language="CSharp"> <imports> <import name="System" /> <import name="System.Reflection" /> <import name="System.Runtime.CompilerServices" /> <import name="System.Runtime.InteropServices" /> <import name="System.Security.Permissions" /> </imports> <attributes> <attribute type="AssemblyTitleAttribute" value="${nant.project.name} for ${current.runtime.description}" /> <attribute type="AssemblyDescriptionAttribute" value="Cache provider for NHibernate using ASP.NET Cache object." /> <attribute type="AssemblyCompanyAttribute" value="nhibernate.sourceforge.net" /> <attribute type="AssemblyProductAttribute" value="${nant.project.name}" /> <attribute type="AssemblyCopyrightAttribute" value="Licensed under LGPL." /> <attribute type="AssemblyVersionAttribute" value="${project.version}" /> <attribute type="AssemblyInformationalVersionAttribute" value="${project.version.major}.${project.version.minor}" /> <attribute type="AssemblyKeyFileAttribute" value="${keyFile}" if="${sign}" /> </attributes> </asminfo> <csc output="${build.dir}/bin/${nant.project.name}.dll" doc="${build.dir}/bin/${nant.project.name}.xml" target="library" debug="${build.debug}" define="${current.build.defines}" optimize="true" > <sources> <excludes name="**/*Fixture.cs" /> <includes name="**/*.cs" /> </sources> <references> <includes name="System.dll" /> <includes name="System.Data.dll" /> <includes name="System.Web.dll" /> <includes name="System.XML.dll" /> <includes name="${build.dir}/bin/NHibernate.dll" /> <includes name="${build.dir}/bin/log4net.dll" /> </references> </csc> <csc output="${build.dir}/bin/${nant.project.name}.Tests.dll" target="library" debug="${build.debug}" define="${current.build.defines}" optimize="true" > <sources> <includes name="**/AssemblyInfo.cs" /> <includes name="**/*Fixture.cs" /> </sources> <references> <includes name="System.dll" /> <includes name="System.Data.dll" /> <includes name="System.XML.dll" /> <includes name="${build.dir}/bin/${nant.project.name}.dll" /> <includes name="${build.dir}/bin/NHibernate.dll" /> <includes name="${build.dir}/bin/nunit.framework.dll" /> <includes name="${build.dir}/bin/log4net.dll" /> </references> </csc> </target> <target name="test" depends="build" description="run unit tests"> <copy file="syscache.config" tofile="${build.dir}/bin/${nant.project.name}.dll.config" /> <nunit2 failonerror="false"> <formatter type="Xml" usefile="true" extension=".xml" outputdir="${build.dir}/bin" /> <test assemblyname="${build.dir}/bin/${nant.project.name}.Tests.dll" appconfig="${build.dir}/syscache.config" /> </nunit2> </target> </project> |
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:25
|
Update of /cvsroot/nhibernate/NHibernateContrib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040/src Modified Files: Nullables-1.1.sln Log Message: initial check-in of SysCache currently unable to fully test, as Clover.NET license and SQL Server are not on current workstation Index: Nullables-1.1.sln =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables-1.1.sln,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nullables-1.1.sln 12 Nov 2004 22:08:25 -0000 1.1 --- Nullables-1.1.sln 7 Dec 2004 19:59:14 -0000 1.2 *************** *** 12,15 **** --- 12,23 ---- EndProjectSection EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BantamTech.SysCache-1.1", "BantamTech.SysCache\BantamTech.SysCache-1.1.csproj", "{21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection + EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BantamTech.SysCache.Tests-1.1", "BantamTech.SysCache\BantamTech.SysCache.Tests-1.1.csproj", "{53E01216-76B6-4920-A386-2486ACEE5AEA}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 30,33 **** --- 38,49 ---- {35F82297-CAB4-4D57-AAB9-CBDB1F6B8841}.Release.ActiveCfg = Release|.NET {35F82297-CAB4-4D57-AAB9-CBDB1F6B8841}.Release.Build.0 = Release|.NET + {21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}.Debug.ActiveCfg = Debug|.NET + {21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}.Debug.Build.0 = Debug|.NET + {21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}.Release.ActiveCfg = Release|.NET + {21FB1DFD-A6A9-4C8D-B4E2-CCB2EBDF8F16}.Release.Build.0 = Release|.NET + {53E01216-76B6-4920-A386-2486ACEE5AEA}.Debug.ActiveCfg = Debug|.NET + {53E01216-76B6-4920-A386-2486ACEE5AEA}.Debug.Build.0 = Debug|.NET + {53E01216-76B6-4920-A386-2486ACEE5AEA}.Release.ActiveCfg = Release|.NET + {53E01216-76B6-4920-A386-2486ACEE5AEA}.Release.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
From: Kevin W. <kev...@us...> - 2004-12-07 19:57:00
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22466/BantamTech.SysCache Log Message: Directory /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache added to the repository |
From: Donald L M. Jr. <lu...@us...> - 2004-12-06 13:55:17
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20749/src/Nullables/TypeConverters Modified Files: NullableDateTimeConverter.cs Log Message: Added converting to/from DateTime for NullableDateTime. .NET DateTimePicker still doesn't handle nulls, but it can at least bind to a nullable type. Index: NullableDateTimeConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableDateTimeConverter.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NullableDateTimeConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 --- NullableDateTimeConverter.cs 6 Dec 2004 13:55:05 -0000 1.3 *************** *** 16,19 **** --- 16,23 ---- if (sourceType == typeof(string)) return true; + else if (sourceType == typeof(DateTime)) + return true; + else if (sourceType == typeof(DBNull)) + return true; else return base.CanConvertFrom (context, sourceType); *************** *** 24,27 **** --- 28,33 ---- if (destinationType == typeof(InstanceDescriptor)) return true; + else if (destinationType == typeof(DateTime)) + return true; else return base.CanConvertTo (context, destinationType); *************** *** 34,37 **** --- 40,51 ---- return NullableDateTime.Default; } + if (value is DateTime) + { + return new NullableDateTime((DateTime)value); + } + if (value is DBNull) + { + return NullableDateTime.Default; + } if (value is string) { *************** *** 50,54 **** else { ! return base.ConvertFrom (context, culture, value); } } --- 64,68 ---- else { ! return base.ConvertFrom(context, culture, value); } } *************** *** 69,72 **** --- 83,95 ---- } } + else if (destinationType == typeof(DateTime)) + { + NullableDateTime ndt = (NullableDateTime)value; + + if (ndt.HasValue) + return ndt.Value; + else + return DBNull.Value; + } return base.ConvertTo (context, culture, value, destinationType); |
From: Donald L M. Jr. <lu...@us...> - 2004-12-06 13:37:07
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16381/src/Nullables/TypeConverters Modified Files: NullableBooleanConverter.cs NullableByteConverter.cs NullableDateTimeConverter.cs NullableDecimalConverter.cs NullableDoubleConverter.cs NullableGuidConverter.cs NullableInt16Converter.cs NullableInt32Converter.cs NullableInt64Converter.cs NullableSingleConverter.cs Log Message: Removed Console.WriteLine()s. It's a poor way to log (was useful during while debugging). Index: NullableGuidConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableGuidConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableGuidConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableGuidConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableDateTimeConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableDateTimeConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDateTimeConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableDateTimeConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableDecimalConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableDecimalConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDecimalConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableDecimalConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableSingleConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableSingleConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableSingleConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableSingleConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableBooleanConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableBooleanConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableBooleanConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableBooleanConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableInt64Converter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableInt64Converter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt64Converter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableInt64Converter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableInt32Converter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableInt32Converter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt32Converter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableInt32Converter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableByteConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableByteConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableByteConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableByteConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableDoubleConverter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableDoubleConverter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDoubleConverter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableDoubleConverter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- Index: NullableInt16Converter.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/TypeConverters/NullableInt16Converter.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt16Converter.cs 12 Nov 2004 22:08:27 -0000 1.1 --- NullableInt16Converter.cs 6 Dec 2004 13:36:58 -0000 1.2 *************** *** 14,18 **** public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { - Console.WriteLine("CanConvertFrom? " + sourceType.ToString()); if (sourceType == typeof(string)) return true; --- 14,17 ---- *************** *** 23,27 **** public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { - Console.WriteLine("CanConvertTo? " + destinationType.ToString()); if (destinationType == typeof(InstanceDescriptor)) return true; --- 22,25 ---- |
From: Michael D. <mik...@us...> - 2004-12-06 03:39:33
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27998/Dialect Modified Files: MySQLDialect.cs Log Message: patch for Sergey for LIMIT support and modified driver to no longer prepare commands. Index: MySQLDialect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Dialect/MySQLDialect.cs,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** MySQLDialect.cs 29 Oct 2004 05:52:44 -0000 1.20 --- MySQLDialect.cs 6 Dec 2004 03:39:23 -0000 1.21 *************** *** 3,6 **** --- 3,7 ---- using System.Text; + using NHibernate.SqlCommand; using NHibernate.SqlTypes; using NHibernate.Util; *************** *** 24,28 **** Register( DbType.AnsiString, 16777215, "MEDIUMTEXT" ); Register( DbType.Binary, "LONGBLOB"); ! Register( DbType.Binary, 255, "VARCHAR($1) BINARY"); Register( DbType.Binary, 65535, "BLOB"); Register( DbType.Binary, 16777215, "MEDIUMBLOB"); --- 25,29 ---- Register( DbType.AnsiString, 16777215, "MEDIUMTEXT" ); Register( DbType.Binary, "LONGBLOB"); ! Register( DbType.Binary, 127, "TINYBLOB"); Register( DbType.Binary, 65535, "BLOB"); Register( DbType.Binary, 16777215, "MEDIUMBLOB"); *************** *** 34,38 **** Register( DbType.Decimal, "NUMERIC(19,5)" ); Register( DbType.Decimal, 19, "NUMERIC(19, $1)"); ! Register( DbType.Double, "FLOAT" ); Register( DbType.Guid, "VARCHAR(40)" ); Register( DbType.Int16, "SMALLINT" ); --- 35,39 ---- Register( DbType.Decimal, "NUMERIC(19,5)" ); Register( DbType.Decimal, 19, "NUMERIC(19, $1)"); ! Register( DbType.Double, "DOUBLE" ); Register( DbType.Guid, "VARCHAR(40)" ); Register( DbType.Int16, "SMALLINT" ); *************** *** 92,95 **** --- 93,127 ---- } + public override bool SupportsLimit + { + get { return true; } + } + + public override bool PreferLimit + { + get { return true; } + } + + public override SqlString GetLimitString(SqlString querySqlString) + { + Parameter p1 = new Parameter(); + Parameter p2 = new Parameter(); + + p1.Name = "p1"; + p1.SqlType = new Int32SqlType(); + + p2.Name = "p2"; + p2.SqlType = new Int32SqlType(); + + SqlStringBuilder pagingBuilder = new SqlStringBuilder(); + pagingBuilder.Add(querySqlString); + pagingBuilder.Add(" limit "); + pagingBuilder.Add(p1); + pagingBuilder.Add(", "); + pagingBuilder.Add(p2); + + return pagingBuilder.ToSqlString(); + } + public override string GetAddForeignKeyConstraintString(string constraintName, string[] foreignKey, string referencedTable, string[] primaryKey) { |
From: Michael D. <mik...@us...> - 2004-12-06 03:39:31
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27998/Driver Modified Files: MySqlDataDriver.cs Log Message: patch for Sergey for LIMIT support and modified driver to no longer prepare commands. Index: MySqlDataDriver.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Driver/MySqlDataDriver.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MySqlDataDriver.cs 3 Nov 2004 14:44:55 -0000 1.1 --- MySqlDataDriver.cs 6 Dec 2004 03:39:16 -0000 1.2 *************** *** 73,86 **** } ! // protected override IDbDataParameter GenerateParameter(IDbCommand command, string name, Parameter parameter, Dialect.Dialect dialect) ! // { ! // IDbDataParameter dbParam = command.CreateParameter(); ! // dbParam.DbType = parameter.SqlType.DbType; ! // ! // //dbParam.ParameterName = this.FormatNameForParameter(name); ! // ! // return dbParam; ! // } ! } } --- 73,84 ---- } ! /// <summary> ! /// With the Gamma MySql.Data provider it is throwing an exception with the ! /// message "Expected End of data packet" when a select command is prepared. ! /// </summary> ! public override bool SupportsPreparingCommands ! { ! get { return false; } ! } } } |
From: Michael D. <mik...@us...> - 2004-12-06 03:17:18
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23391/Nullables.NHibernate Modified Files: AssemblyInfo.cs NullableTypesType.cs Log Message: minor modification to test fixtures. Index: NullableTypesType.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate/NullableTypesType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableTypesType.cs 12 Nov 2004 22:08:26 -0000 1.1 --- NullableTypesType.cs 6 Dec 2004 03:16:59 -0000 1.2 *************** *** 10,14 **** { /// <summary> ! /// Abstract type used for implementing types from the NullableTypes library. /// </summary> public abstract class NullableTypesType : NullableType --- 10,14 ---- { /// <summary> ! /// Abstract type used for implementing types from the Nullables library. /// </summary> public abstract class NullableTypesType : NullableType Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssemblyInfo.cs 12 Nov 2004 22:08:26 -0000 1.1 --- AssemblyInfo.cs 6 Dec 2004 03:16:59 -0000 1.2 *************** *** 17,23 **** [assembly: AssemblyProductAttribute("Nullables.NHibernate")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.4.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.4")] ! [assembly: AssemblyFileVersionAttribute("0.4.0.0")] ! [assembly: AssemblyDelaySignAttribute(false)] --- 17,23 ---- [assembly: AssemblyProductAttribute("Nullables.NHibernate")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.5.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.5")] ! [assembly: AssemblyFileVersionAttribute("0.5.0.0")] ! //[assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] |
From: Michael D. <mik...@us...> - 2004-12-06 03:17:18
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23391/Nullables.Tests Modified Files: AssemblyInfo.cs Nullables.Tests-1.1.csproj Added Files: NullableBooleanFixture.cs NullableByteFixture.cs NullableDateTimeFixture.cs NullableDecimalFixture.cs NullableDoubleFixture.cs NullableGuidFixture.cs NullableInt16Fixture.cs NullableInt32Fixture.cs NullableInt64Fixture.cs NullableSingleFixture.cs Removed Files: BasicTests.cs Log Message: minor modification to test fixtures. --- NEW FILE: NullableBooleanFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableBooleanFixture. /// </summary> [TestFixture] public class NullableBooleanFixture { public NullableBooleanFixture() { // // TODO: Add constructor logic here // } } } --- NEW FILE: NullableGuidFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableGuidFixture. /// </summary> [TestFixture] public class NullableGuidFixture { [Test] public void BasicTestGuid() { NullableGuid v1 = new Guid("00000000-0000-0000-0000-000000000005"); //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(new Guid("00000000-0000-0000-0000-000000000005"))); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == new Guid("00000000-0000-0000-0000-000000000005")); Assert.IsFalse(v1.Equals(NullableGuid.Default)); Assert.IsTrue(v1.Equals(new NullableGuid(new Guid("00000000-0000-0000-0000-000000000005")))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == new Guid("00000000-0000-0000-0000-000000000005")); Assert.IsFalse(v1 == new Guid("00000000-0000-0000-0000-000000000008")); Assert.IsFalse(v1 == NullableGuid.Default); Assert.IsTrue(v1 == new NullableGuid(new Guid("00000000-0000-0000-0000-000000000005"))); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableGuid.Default); v1 = NullableGuid.Default; Assert.IsTrue(v1 == NullableGuid.Default); NullableGuid v2 = NullableGuid.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(new Guid("00000000-0000-0000-0000-000000000002"))); Assert.IsTrue(v2.Equals(NullableGuid.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- BasicTests.cs DELETED --- --- NEW FILE: NullableDateTimeFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableDateTimeFixture. /// </summary> [TestFixture] public class NullableDateTimeFixture { [Test] public void BasicTestDateTime() { NullableDateTime v1 = new DateTime(1979, 11, 8); Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(new DateTime(1979, 11, 8))); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == new DateTime(1979, 11, 8)); Assert.IsFalse(v1.Equals(NullableDateTime.Default)); Assert.IsTrue(v1.Equals(new NullableDateTime(new DateTime(1979, 11, 8)))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == new DateTime(1979, 11, 8)); Assert.IsFalse(v1 == new DateTime(1980, 10, 9)); Assert.IsFalse(v1 == NullableDateTime.Default); Assert.IsTrue(v1 == new NullableDateTime(new DateTime(1979, 11, 8))); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableDateTime.Default); v1 = NullableDateTime.Default; Assert.IsTrue(v1 == NullableDateTime.Default); NullableDateTime v2 = NullableDateTime.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(new DateTime(2004, 12, 25))); Assert.IsTrue(v2.Equals(NullableDateTime.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- NEW FILE: NullableInt16Fixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableInt16Fixture. /// </summary> [TestFixture] public class NullableInt16Fixture { [Test] public void BasicTestInt16() { NullableInt16 v1 = 32; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(32)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 32); Assert.IsFalse(v1.Equals(NullableInt16.Default)); Assert.IsTrue(v1.Equals(new NullableInt16(32))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 32); Assert.IsFalse(v1 == 33); Assert.IsFalse(v1 == NullableInt16.Default); Assert.IsTrue(v1 == new NullableInt16(32)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableInt16.Default); v1 = NullableInt16.Default; Assert.IsTrue(v1 == NullableInt16.Default); NullableInt16 v2 = NullableInt16.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(12)); Assert.IsTrue(v2.Equals(NullableInt16.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssemblyInfo.cs 12 Nov 2004 22:08:26 -0000 1.1 --- AssemblyInfo.cs 6 Dec 2004 03:16:59 -0000 1.2 *************** *** 17,23 **** [assembly: AssemblyProductAttribute("Nullables.Tests")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.4.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.4")] ! [assembly: AssemblyFileVersionAttribute("0.4.0.0")] [assembly: AssemblyDelaySignAttribute(false)] --- 17,23 ---- [assembly: AssemblyProductAttribute("Nullables.Tests")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.5.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.5")] ! [assembly: AssemblyFileVersionAttribute("0.5.0.0")] [assembly: AssemblyDelaySignAttribute(false)] --- NEW FILE: NullableDoubleFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableDoubleFixture. /// </summary> [TestFixture] public class NullableDoubleFixture { [Test] public void BasicTestDouble() { NullableDouble v1 = 32; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(32)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 32); Assert.IsFalse(v1.Equals(NullableDouble.Default)); Assert.IsTrue(v1.Equals(new NullableDouble(32))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 32); Assert.IsFalse(v1 == 33); Assert.IsFalse(v1 == NullableDouble.Default); Assert.IsTrue(v1 == new NullableDouble(32)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableDouble.Default); v1 = NullableDouble.Default; Assert.IsTrue(v1 == NullableDouble.Default); NullableDouble v2 = NullableDouble.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(12)); Assert.IsTrue(v2.Equals(NullableDouble.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- NEW FILE: NullableInt64Fixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableInt64Fixture. /// </summary> [TestFixture] public class NullableInt64Fixture { [Test] public void BasicTestInt64() { NullableInt64 v1 = 46816684; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(46816684)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 46816684); Assert.IsFalse(v1.Equals(NullableInt64.Default)); Assert.IsTrue(v1.Equals(new NullableInt64(46816684))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 46816684); Assert.IsFalse(v1 == 448494894); Assert.IsFalse(v1 == NullableInt64.Default); Assert.IsTrue(v1 == new NullableInt64(46816684)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableInt64.Default); v1 = NullableInt64.Default; Assert.IsTrue(v1 == NullableInt64.Default); NullableInt64 v2 = NullableInt64.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(4484)); Assert.IsTrue(v2.Equals(NullableInt64.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- NEW FILE: NullableDecimalFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableDecimalFixture. /// </summary> [TestFixture] public class NullableDecimalFixture { [Test] public void BasicTestDecimal() { NullableDecimal v1 = 4.99m; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(4.99m)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 4.99m); Assert.IsFalse(v1.Equals(NullableDecimal.Default)); Assert.IsTrue(v1.Equals(new NullableDecimal(4.99m))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 4.99m); Assert.IsFalse(v1 == 5.01m); Assert.IsFalse(v1 == NullableDecimal.Default); Assert.IsTrue(v1 == new NullableDecimal(4.99m)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableDecimal.Default); v1 = NullableDecimal.Default; Assert.IsTrue(v1 == NullableDecimal.Default); NullableDecimal v2 = NullableDecimal.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(4.01m)); Assert.IsTrue(v2.Equals(NullableDecimal.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- NEW FILE: NullableSingleFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableSingleFixture. /// </summary> [TestFixture] public class NullableSingleFixture { [Test] public void BasicTestSingle() { NullableSingle v1 = 32; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(32)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 32); Assert.IsFalse(v1.Equals(NullableSingle.Default)); Assert.IsTrue(v1.Equals(new NullableSingle(32))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 32); Assert.IsFalse(v1 == 33); Assert.IsFalse(v1 == NullableSingle.Default); Assert.IsTrue(v1 == new NullableSingle(32)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableSingle.Default); v1 = NullableSingle.Default; Assert.IsTrue(v1 == NullableSingle.Default); NullableSingle v2 = NullableSingle.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(12)); Assert.IsTrue(v2.Equals(NullableSingle.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } Index: Nullables.Tests-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests/Nullables.Tests-1.1.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nullables.Tests-1.1.csproj 12 Nov 2004 22:08:26 -0000 1.1 --- Nullables.Tests-1.1.csproj 6 Dec 2004 03:17:00 -0000 1.2 *************** *** 119,123 **** /> <File ! RelPath = "BasicTests.cs" SubType = "Code" BuildAction = "Compile" --- 119,163 ---- /> <File ! RelPath = "NullableBooleanFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableByteFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableDateTimeFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableDecimalFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableDoubleFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableGuidFixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableInt16Fixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableInt32Fixture.cs" ! SubType = "Code" ! BuildAction = "Compile" ! /> ! <File ! RelPath = "NullableInt64Fixture.cs" SubType = "Code" BuildAction = "Compile" *************** *** 132,135 **** --- 172,180 ---- /> <File + RelPath = "NullableSingleFixture.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "NHibernate\NullablesClass.cs" SubType = "Code" --- NEW FILE: NullableByteFixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableByteFixture. /// </summary> [TestFixture] public class NullableByteFixture { [Test] public void BasicTestByte() { NullableByte v1 = 32; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(32)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 32); Assert.IsFalse(v1.Equals(NullableByte.Default)); Assert.IsTrue(v1.Equals(new NullableByte(32))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 32); Assert.IsFalse(v1 == 33); Assert.IsFalse(v1 == NullableByte.Default); Assert.IsTrue(v1 == new NullableByte(32)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableByte.Default); v1 = NullableByte.Default; Assert.IsTrue(v1 == NullableByte.Default); NullableByte v2 = NullableByte.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(12)); Assert.IsTrue(v2.Equals(NullableByte.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); } } } --- NEW FILE: NullableInt32Fixture.cs --- using System; using Nullables; using NUnit.Framework; namespace Nullables.Tests { /// <summary> /// Summary description for NullableInt32Fixture. /// </summary> [TestFixture] public class NullableInt32Fixture { [Test] public void BasicTestInt32() { NullableInt32 v1 = 32; //should take an int literal Assert.IsTrue(v1.HasValue); //should have a value; Assert.IsTrue(v1.Equals(32)); //implicit casting should make this result in true. Assert.IsTrue(v1.Value == 32); Assert.IsFalse(v1.Equals(NullableInt32.Default)); Assert.IsTrue(v1.Equals(new NullableInt32(32))); //should == a new instance with the same inner value. //same thing, but with == instead of .Equals() Assert.IsTrue(v1 == 32); Assert.IsFalse(v1 == 33); Assert.IsFalse(v1 == NullableInt32.Default); Assert.IsTrue(v1 == new NullableInt32(32)); //now null v1. v1 = DBNull.Value; Assert.IsTrue(v1 == NullableInt32.Default); v1 = NullableInt32.Default; Assert.IsTrue(v1 == NullableInt32.Default); NullableInt32 v2 = NullableInt32.Default; //should start as "null" Assert.IsFalse(v2.HasValue); Assert.IsFalse(v2.Equals(12)); Assert.IsTrue(v2.Equals(NullableInt32.Default)); Assert.IsTrue(v2.Equals(DBNull.Value)); Assert.IsTrue( v2==null ); } } } |
From: Michael D. <mik...@us...> - 2004-12-06 03:17:09
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23391/Nullables Modified Files: AssemblyInfo.cs Log Message: minor modification to test fixtures. Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AssemblyInfo.cs 12 Nov 2004 22:08:25 -0000 1.1 --- AssemblyInfo.cs 6 Dec 2004 03:16:51 -0000 1.2 *************** *** 17,22 **** [assembly: AssemblyProductAttribute("Nullables")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.4.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.4")] ! [assembly: AssemblyFileVersionAttribute("0.4.0.0")] --- 17,23 ---- [assembly: AssemblyProductAttribute("Nullables")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] ! [assembly: AssemblyVersionAttribute("0.5.0.0")] ! [assembly: AssemblyInformationalVersionAttribute("0.5")] ! [assembly: AssemblyFileVersionAttribute("0.5.0.0")] ! //[assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] |
From: Michael D. <mik...@us...> - 2004-12-06 03:01:40
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20832/src/NHibernate Modified Files: IUserType.cs Log Message: removed DbType {get;} from IUserType since SqlType {get;} is the property being used to get that. Index: IUserType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/IUserType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IUserType.cs 10 Feb 2004 18:26:21 -0000 1.3 --- IUserType.cs 6 Dec 2004 03:01:26 -0000 1.4 *************** *** 10,14 **** /// <remarks> /// <para> ! /// The inteface abstracts user code from future changes to the <c>HibernateType</c> inteface, /// simplifies the implementation of custom types and hides certain "internal interfaces from /// user code. --- 10,14 ---- /// <remarks> /// <para> ! /// The inteface abstracts user code from future changes to the <see cref="Type.IType"/> inteface, /// simplifies the implementation of custom types and hides certain "internal interfaces from /// user code. *************** *** 22,38 **** /// </para> /// <para> ! /// Alternatively, custom types could implement <c>HibernateType</c> directly or extend one of the /// abstract classes in <c>NHibernate.Type</c>. This approach risks future incompatible changes /// to classes or intefaces in the package. /// </para> /// </remarks> ! public interface IUserType { ! ! /// <summary> ! /// The DbType codes for the columns mapped by this type. The codes are defined on ! /// <c></c> ! /// </summary> ! DbType[] DbTypes { get; } ! /// <summary> /// The SQL types for the columns mapped by this type. --- 22,32 ---- /// </para> /// <para> ! /// Alternatively, custom types could implement <see cref="Types.IType"/> directly or extend one of the /// abstract classes in <c>NHibernate.Type</c>. This approach risks future incompatible changes /// to classes or intefaces in the package. /// </para> /// </remarks> ! public interface IUserType ! { /// <summary> /// The SQL types for the columns mapped by this type. |
From: Michael D. <mik...@us...> - 2004-12-06 03:01:35
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHSpecific In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20832/src/NHibernate.DomainModel/NHSpecific Modified Files: NullInt32UserType.cs Log Message: removed DbType {get;} from IUserType since SqlType {get;} is the property being used to get that. Index: NullInt32UserType.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.DomainModel/NHSpecific/NullInt32UserType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullInt32UserType.cs 11 Jun 2004 20:08:46 -0000 1.1 --- NullInt32UserType.cs 6 Dec 2004 03:01:27 -0000 1.2 *************** *** 8,12 **** namespace NHibernate.DomainModel.NHSpecific { - /// <summary> /// Converts a value of 0 to a DbNull --- 8,11 ---- *************** *** 43,54 **** } - public System.Data.DbType[] DbTypes - { - get - { - return new DbType[] { _int32Type.SqlType.DbType }; - } - } - public object DeepCopy(object value) { --- 42,45 ---- |
From: Michael D. <mik...@us...> - 2004-12-06 02:35:41
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15324 Modified Files: releasenotes.txt Log Message: some updates for next build. Index: releasenotes.txt =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/releasenotes.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** releasenotes.txt 2 Dec 2004 19:32:38 -0000 1.21 --- releasenotes.txt 6 Dec 2004 02:35:32 -0000 1.22 *************** *** 1,2 **** --- 1,8 ---- + Build 0.6.0.0 + ======================== + - Removed DbType {get;} from IUserType. + - Fixed problem with spaces in sql generated from hql and MySql. + - Modified logging in Transaction to not generate as many messages. + Build 0.5.0.0 ======================== |
From: Michael D. <mik...@us...> - 2004-12-06 02:35:18
|
Update of /cvsroot/nhibernate/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15256 Modified Files: commitinfo Log Message: cvs_acls should now be enabled - hopefully I didn't just lock myself out Index: commitinfo =================================================================== RCS file: /cvsroot/nhibernate/CVSROOT/commitinfo,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** commitinfo 12 Feb 2003 22:13:04 -0000 1.1 --- commitinfo 6 Dec 2004 02:35:04 -0000 1.2 *************** *** 14,15 **** --- 14,16 ---- # If the name "ALL" appears as a regular expression it is always used # in addition to the first matching regex or "DEFAULT". + ALL /cvsroot/sitedocs/CVSROOT/cvstools/cvs_acls |
From: Michael D. <mik...@us...> - 2004-12-06 02:33:18
|
Update of /cvsroot/nhibernate/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14877 Modified Files: checkoutlist Added Files: avail Log Message: Added avail file and added it to end of checkoutlist Index: checkoutlist =================================================================== RCS file: /cvsroot/nhibernate/CVSROOT/checkoutlist,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** checkoutlist 5 Apr 2004 14:55:56 -0000 1.2 --- checkoutlist 6 Dec 2004 02:33:07 -0000 1.3 *************** *** 13,14 **** --- 13,15 ---- # comment lines begin with '#' syncmail + avail --- NEW FILE: avail --- unavail avail|luggage, kevinwilliams|NHibernateContrib avail|mikedoerfler, szoke |
From: Michael D. <mik...@us...> - 2004-12-06 02:22:15
|
Update of /cvsroot/nhibernate/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12694 Modified Files: modules Log Message: Setup modules for nhibernate and NHibernateContrib for cvs_acls Index: modules =================================================================== RCS file: /cvsroot/nhibernate/CVSROOT/modules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modules 12 Feb 2003 22:13:04 -0000 1.1 --- modules 6 Dec 2004 02:21:59 -0000 1.2 *************** *** 25,26 **** --- 25,29 ---- # can be useful for creating a module that consists of many directories # spread out over the entire source repository. + + nhibernate nhibernate + NHibernateContrib NHibernateContrib |
From: Michael D. <mik...@us...> - 2004-12-06 02:07:42
|
Update of /cvsroot/nhibernate/NHibernateContrib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/src Modified Files: .cvsignore Log Message: Added clover tasks to NHibernateContrib build. Index: .cvsignore =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 12 Nov 2004 22:08:25 -0000 1.1 --- .cvsignore 6 Dec 2004 02:07:25 -0000 1.2 *************** *** 1 **** --- 1,3 ---- *.suo + *.snk + CloverSrc |
From: Michael D. <mik...@us...> - 2004-12-06 02:07:38
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/src/Nullables.NHibernate Modified Files: Nullables.NHibernate.build Log Message: Added clover tasks to NHibernateContrib build. Index: Nullables.NHibernate.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate/Nullables.NHibernate.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nullables.NHibernate.build 12 Nov 2004 22:08:26 -0000 1.1 --- Nullables.NHibernate.build 6 Dec 2004 02:07:26 -0000 1.2 *************** *** 9,14 **** <!-- Required properties: ! * build.dir - (path) root level to build to, assemblies will go in ${build.dir}/bin ! * build.debug - (true|false) debug build? * current.build.defines - framework-specific build defines * project.version - full project version --- 9,14 ---- <!-- Required properties: ! * build.dir - (path) root level to build to, assemblies will go in ${build.dir}/bin ! * build.debug - (true|false) debug build? * current.build.defines - framework-specific build defines * project.version - full project version *************** *** 16,21 **** --- 16,41 ---- * project.version.minor - the minor number of the build * project.version.build - the build number + * sign - (true|false)indicates if the Assembly should be signed. + * clover.enabled - (true|false) indicates if Clover.NET should handle the build + * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib + * clover.db - location of the coverage db from the root of NHibernateContrib --> + <if propertytrue="clover.enabled"> + <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> + </if> + + <property name="keyFile" value="..\NHibernate.snk" /> + <target name="build" description="Build the NHibernate Types for the Nullables"> + + <if propertytrue="clover.enabled"> + <clover-setup + initstring="..\..\${clover.db}" + builddir="..\..\${clover.src}\${nant.project.name}" + enabled="${clover.enabled}" + flushinterval="1000" + /> + </if> + <!-- ensure the AssemblyInfo is writable --> <attrib file="AssemblyInfo.cs" readonly="false" /> *************** *** 35,39 **** <attribute type="AssemblyInformationalVersionAttribute" value="${project.version.major}.${project.version.minor}" /> <attribute type="AssemblyFileVersionAttribute" value="${project.version}" /> ! <attribute type="AssemblyDelaySignAttribute" value="false" /> </attributes> </asminfo> --- 55,59 ---- <attribute type="AssemblyInformationalVersionAttribute" value="${project.version.major}.${project.version.minor}" /> <attribute type="AssemblyFileVersionAttribute" value="${project.version}" /> ! <attribute type="AssemblyKeyFileAttribute" value="${keyFile}" if="${sign}"/> </attributes> </asminfo> |
From: Michael D. <mik...@us...> - 2004-12-06 02:07:38
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652 Modified Files: NHibernateContribSolution.build Added Files: debug.bat release-package.bat Log Message: Added clover tasks to NHibernateContrib build. --- NEW FILE: debug.bat --- NAnt clean build-with-clover test >debug-with-clover.log NAnt clean-bin test >debug.log --- NEW FILE: release-package.bat --- NAnt -D:project.config=release -D:sign=true clean build-with-clover test >release-with-clover.log NAnt -D:project.config=release -D:sign=true -D:nunit2report.installed=true clean-bin package >release-package.log Index: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NHibernateContribSolution.build 12 Nov 2004 22:08:23 -0000 1.1 --- NHibernateContribSolution.build 6 Dec 2004 02:07:25 -0000 1.2 *************** *** 15,23 **** <!-- These are used to set the correct Attributes in AssemblyInfo.cs. --> ! <property name="project.name" value="nullables" /> <property name="project.version.major" value="0" /> ! <property name="project.version.minor" value="4" /> <property name="project.version.build" value="0" /> <property name="project.version.revision" value="0" /> --- 15,37 ---- <!-- + if nunit2report tasks from http://nunit2report.sourceforge.net/ has been installed + then change this to true. It generates a nice looking html report for the test files + --> + <property name="nunit2report.installed" value="false" /> + + <!-- + Cenqua provided a license of Clover.NET for the NHibernate project to use. + --> + <property name="clover.enabled" value="false" /> + <property name="clover.src" value="src\CloverSrc" /> + <property name="clover.db" value="${clover.src}\clover.cdb" /> + <property name="clover.home" value="C:/Program Files/Cenqua/Clover.NET" /> + + <!-- These are used to set the correct Attributes in AssemblyInfo.cs. --> ! <property name="project.name" value="NHibernateContrib" /> <property name="project.version.major" value="0" /> ! <property name="project.version.minor" value="5" /> <property name="project.version.build" value="0" /> <property name="project.version.revision" value="0" /> *************** *** 62,65 **** --- 76,83 ---- </target> + <target name="clean-bin" depends="init" description="Deletes the current bin folder"> + <delete dir="${build.dir}/bin" failonerror="false" /> + </target> + <target name="cleanall" description="Deletes every build configuration"> <echo message="Deleting all builds from all configurations" /> *************** *** 67,70 **** --- 85,106 ---- </target> + <target name="build-with-clover" depends="init" description="Builds current config with Clover coverage"> + <!-- + mark this as being a clover enabled build and then just let the normal build + process take place + --> + <property name="clover.enabled" value="true" /> + </target> + + <target name="build-without-clover" depends="init" description="Ensures the build is done without Clover coverage"> + <!-- + This does not really need to be called unless the clover.enabled property has been explicitly + set to true by some other means since clover.enabled defaults to false. It is my intention + to first do a clover build to get the coverage then to do a non-clover build to get the + clover-free dlls. + --> + <property name="clover.enabled" value="false" /> + </target> + <target name="build" depends="init" description="Builds current configuration"> <echo message="Current Directory is ${nant.project.basedir}" /> *************** *** 138,141 **** --- 174,193 ---- /> + <!-- if this was a clover enabled build then generate the clover reports for it --> + <call target="coverage-report" if="${clover.enabled}" /> + </target> + + <target name="coverage-report" description="Builds the Test Coverage reports"> + + <mkdir dir="${build.dir}/clover" /> + <clover-setup + initstring="${clover.db}" + flushinterval="1000" + /> + <clover-report> + <current title="NHibernateContrib Clover Report" output="${build.dir}/clover" > + <format type="html" orderBy="Alpha" /> + </current> + </clover-report> </target> *************** *** 209,216 **** <includes name="${lib.dir}/**" /> <!-- copy all of the source --> <includes name="src/**" /> ! <includes name="NullablesSolution.build" /> <includes name="lgpl.txt" /> <includes name="releasenotes.txt" /> --- 261,273 ---- <includes name="${lib.dir}/**" /> + <!-- + exclude the Clover modified source files. + --> + <excludes name="${clover.src}/**" /> + <!-- copy all of the source --> <includes name="src/**" /> ! <includes name="NHibernateContribSolution.build" /> <includes name="lgpl.txt" /> <includes name="releasenotes.txt" /> |
From: Michael D. <mik...@us...> - 2004-12-06 02:07:38
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/src/Nullables.Tests Modified Files: Nullables.Tests.build Log Message: Added clover tasks to NHibernateContrib build. Index: Nullables.Tests.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests/Nullables.Tests.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nullables.Tests.build 12 Nov 2004 22:08:26 -0000 1.1 --- Nullables.Tests.build 6 Dec 2004 02:07:27 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- * project.version.minor - the minor number of the build * project.version.build - the build number + * nunit2report.installed- (true|false) if nunit2report has been installed to generate html reports --> *************** *** 87,90 **** --- 88,100 ---- /> </nunit2> + + <if propertytrue="nunit2report.installed"> + <mkdir dir="${build.dir}/testresults" /> + <nunit2report out="${build.dir}/testresults/index.html" format="Frames" todir="${build.dir}/testresults"> + <fileset> + <includes name="${build.dir}\bin\*results.xml" /> + </fileset> + </nunit2report> + </if> </target> </project> \ No newline at end of file |
From: Michael D. <mik...@us...> - 2004-12-06 02:07:36
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9652/src/Nullables Modified Files: Nullables.build Log Message: Added clover tasks to NHibernateContrib build. Index: Nullables.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/Nullables.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Nullables.build 12 Nov 2004 22:08:25 -0000 1.1 --- Nullables.build 6 Dec 2004 02:07:26 -0000 1.2 *************** *** 17,25 **** --- 17,42 ---- * project.version.build - the build number * sign - (true|false)indicates if the Assembly should be signed. + * clover.enabled - (true|false) indicates if Clover.NET should handle the build + * clover.src - location of the clovered source to be stored at from the root of NHibernateContrib + * clover.db - location of the coverage db from the root of NHibernateContrib --> + <if propertytrue="clover.enabled"> + <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> + </if> + <property name="keyFile" value="..\NHibernate.snk" /> <target name="build" description="Build Nullables"> + + <if propertytrue="clover.enabled"> + <clover-setup + initstring="..\..\${clover.db}" + builddir="..\..\${clover.src}\${nant.project.name}" + enabled="${clover.enabled}" + flushinterval="1000" + /> + </if> + <!-- ensure the AssemblyInfo is writable --> <attrib file="AssemblyInfo.cs" readonly="false" /> *************** *** 63,65 **** --- 80,83 ---- </target> + </project> |
From: Michael D. <mik...@us...> - 2004-12-06 02:05:47
|
Update of /cvsroot/nhibernate/NHibernateContrib/lib/net/1.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9056 Modified Files: NHibernate.dll NHibernate.xml Added Files: Iesi.Collections.dll Iesi.Collections.license.txt Iesi.Collections.xml Log Message: Updated with latest nhibernate build. Index: NHibernate.dll =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/lib/net/1.1/NHibernate.dll,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsR9k3AB and /tmp/cvs5NdUj5 differ --- NEW FILE: Iesi.Collections.dll --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Iesi.Collections.xml --- <?xml version="1.0"?> <doc> <assembly> <name>Iesi.Collections</name> </assembly> <members> <member name="T:Iesi.Collections.DictionarySet"> <summary> <p><c>DictionarySet</c> is an abstract class that supports the creation of new <c>Set</c> types where the underlying data store is an <c>IDictionary</c> instance.</p> <p>You can use any object that implements the <c>IDictionary</c> interface to hold set data. You can define your own, or you can use one of the objects provided in the Framework. The type of <c>IDictionary</c> you choose will affect both the performance and the behavior of the <c>Set</c> using it. </p> <p>To make a <c>Set</c> typed based on your own <c>IDictionary</c>, simply derive a new class with a constructor that takes no parameters. Some <c>Set</c> implmentations cannot be defined with a default constructor. If this is the case for your class, [...1050 lines suppressed...] </member> <member name="P:Iesi.Collections.SynchronizedSet.Count"> <summary> The number of elements contained in this collection. </summary> </member> <member name="P:Iesi.Collections.SynchronizedSet.IsSynchronized"> <summary> Returns <c>true</c>, indicating that this object is thread-safe. The exception to this is enumeration, which is inherently not thread-safe. Use the <c>SyncRoot</c> object to lock this object for the entire duration of the enumeration. </summary> </member> <member name="P:Iesi.Collections.SynchronizedSet.SyncRoot"> <summary> Returns an object that can be used to synchronize the <c>Set</c> between threads. </summary> </member> </members> </doc> Index: NHibernate.xml =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/lib/net/1.1/NHibernate.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NHibernate.xml 12 Nov 2004 22:08:24 -0000 1.1 --- NHibernate.xml 6 Dec 2004 02:05:29 -0000 1.2 *************** *** 748,751 **** --- 748,763 ---- <returns>The value of the Identifier.</returns> </member> + <member name="M:NHibernate.Collection.PersistentCollection.NeedsRecreate(NHibernate.Collection.CollectionPersister)"> + <summary> + Gets a <see cref="T:System.Boolean"/> indicating if the rows for this collection + need to be recreated in the table. + </summary> + <param name="persister">The <see cref="T:NHibernate.Collection.CollectionPersister"/> for this Collection.</param> + <returns> [...1497 lines suppressed...] </remarks> </member> --- 10606,10622 ---- <member name="T:NHibernate.Type.TimeType"> <summary> ! Maps a <see cref="T:System.DateTime"/> Property to an DateTime column that only stores the ! Hours, Minutes, and Seconds of the DateTime as significant. </summary> <remarks> ! <para> ! This defaults the Date to "1753-01-01" - that should not matter because using this Type indicates that you don't care about the Date portion of the DateTime. + </para> + <para> + A more appropriate choice to store the duration/time is the <see cref="T:NHibernate.Type.TimeSpanType"/>. + The underlying <see cref="F:System.Data.DbType.Time"/> tends to be handled diffently by different + DataProviders. + </para> </remarks> </member> --- NEW FILE: Iesi.Collections.license.txt --- (This appears to be a binary file; contents omitted.) |
From: Michael D. <mik...@us...> - 2004-12-05 18:42:37
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8577/NHibernate/Transaction Modified Files: Transaction.cs Log Message: NH-159 - modified so there is not an unnecessary log message about commands and transactions not being consistent. Index: Transaction.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Transaction/Transaction.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Transaction.cs 19 Sep 2004 16:15:00 -0000 1.5 --- Transaction.cs 5 Dec 2004 18:42:16 -0000 1.6 *************** *** 31,38 **** if( trans==null ) { ! if(command.Transaction!=null) { ! log.Warn("set a nonnull IDbCommand.Transaction to null because the Session had no Transaction"); } command.Transaction = null; return; --- 31,42 ---- if( trans==null ) { ! if( log.IsWarnEnabled ) { ! if( command.Transaction!=null ) ! { ! log.Warn("set a nonnull IDbCommand.Transaction to null because the Session had no Transaction"); ! } } + command.Transaction = null; return; *************** *** 40,50 **** else { ! ! // got into here because the command was being initialized and had a null Transaction - probably ! // don't need to be confused by that - just a normal part of initialization... ! if(command.Transaction!=null) { ! log.Warn("The IDbCommand had a different Transaction than the Session. This can occur when " + ! "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific."); } --- 44,56 ---- else { ! if( log.IsWarnEnabled ) { ! // got into here because the command was being initialized and had a null Transaction - probably ! // don't need to be confused by that - just a normal part of initialization... ! if( command.Transaction!=null && command.Transaction!=trans ) ! { ! log.Warn("The IDbCommand had a different Transaction than the Session. This can occur when " + ! "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific."); ! } } |
From: Michael D. <mik...@us...> - 2004-12-04 22:42:06
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1955/NHibernate/Hql Modified Files: HavingParser.cs PreprocessingParser.cs QueryTranslator.cs SelectParser.cs WhereParser.cs Log Message: Modified more exceptions to not be "throw e" and instead just be "throw" Moved internal fields from IList to ISet where applicable. Fixed generation of sql from hql that was causing spacing problems with MySql. Index: QueryTranslator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/QueryTranslator.cs,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** QueryTranslator.cs 22 Nov 2004 03:53:07 -0000 1.49 --- QueryTranslator.cs 4 Dec 2004 22:41:20 -0000 1.50 *************** *** 1,11 **** using System; using System.Collections; - using System.Collections.Specialized; using System.Data; - using System.Text; - using System.Text.RegularExpressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using NHibernate; --- 1,12 ---- using System; using System.Collections; using System.Data; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; + using System.Text; + using System.Text.RegularExpressions; + + using Iesi.Collections; using NHibernate; *************** *** 27,32 **** { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(QueryTranslator)); ! private static StringCollection dontSpace = new StringCollection(); ! private IDictionary typeMap = new SequencedHashMap(); private IDictionary collections = new SequencedHashMap(); --- 28,32 ---- { private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(QueryTranslator)); ! private IDictionary typeMap = new SequencedHashMap(); private IDictionary collections = new SequencedHashMap(); *************** *** 36,40 **** private IDictionary namedParameters = new Hashtable(); private IDictionary aliasNames = new Hashtable(); ! private ArrayList crossJoins = new ArrayList(); // contains a List of strings --- 36,40 ---- private IDictionary namedParameters = new Hashtable(); private IDictionary aliasNames = new Hashtable(); ! private ISet crossJoins = new HashedSet(); // contains a List of strings *************** *** 47,52 **** private IList orderByTokens = new ArrayList(); private IList groupByTokens = new ArrayList(); ! private ArrayList identifierSpaces = new ArrayList(); ! private ArrayList entitiesToFetch = new ArrayList(); private IQueryable[] persisters; --- 47,53 ---- private IList orderByTokens = new ArrayList(); private IList groupByTokens = new ArrayList(); ! ! private ISet identifierSpaces = new HashedSet(); ! private ISet entitiesToFetch = new HashedSet(); private IQueryable[] persisters; *************** *** 147,155 **** { qe.QueryString = queryString; ! throw qe; } catch (MappingException me) { ! throw me; } catch (Exception e) --- 148,156 ---- { qe.QueryString = queryString; ! throw; } catch (MappingException me) { ! throw; } catch (Exception e) *************** *** 785,794 **** } ! public IList QuerySpaces { ! get ! { ! return identifierSpaces; ! } } --- 786,792 ---- } ! public ISet QuerySpaces { ! get { return identifierSpaces; } } *************** *** 982,987 **** //if ( Character.isUpperCase( token.charAt( token.lastIndexOf(".") + 1 ) ) ) { if ( ! ( beforeClassTokens.Contains(last) && !notAfterClassTokens.Contains(next) ) || "class".Equals(last) ) { --- 980,987 ---- //if ( Character.isUpperCase( token.charAt( token.lastIndexOf(".") + 1 ) ) ) { + // added the checks for last!=null and next==null because an ISet can not contain + // a null key in .net - it is valid for a null key to be in a java.util.Set if ( ! ( ( last!=null && beforeClassTokens.Contains(last) ) && ( next==null || !notAfterClassTokens.Contains(next) ) ) || "class".Equals(last) ) { *************** *** 1011,1026 **** ! private static readonly IList beforeClassTokens = new ArrayList(); ! private static readonly IList notAfterClassTokens = new ArrayList(); static QueryTranslator() { ! beforeClassTokens.Add("from"); //beforeClassTokens.Add("new"); DEFINITELY DON'T HAVE THIS!! ! beforeClassTokens.Add(","); ! notAfterClassTokens.Add("in"); //notAfterClassTokens.Add(","); ! notAfterClassTokens.Add("from"); ! notAfterClassTokens.Add(")"); } --- 1011,1027 ---- ! private static readonly ISet beforeClassTokens = new HashedSet(); ! private static readonly ISet notAfterClassTokens = new HashedSet(); static QueryTranslator() { ! beforeClassTokens.Add( "from" ); //beforeClassTokens.Add("new"); DEFINITELY DON'T HAVE THIS!! ! beforeClassTokens.Add( "," ); ! ! notAfterClassTokens.Add( "in" ); //notAfterClassTokens.Add(","); ! notAfterClassTokens.Add( "from" ); ! notAfterClassTokens.Add( ")" ); } Index: WhereParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/WhereParser.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** WhereParser.cs 22 Nov 2004 03:53:07 -0000 1.25 --- WhereParser.cs 4 Dec 2004 22:41:20 -0000 1.26 *************** *** 1,7 **** using System; using System.Collections; - using System.Collections.Specialized; using System.Text; using NHibernate.Persister; using NHibernate.Type; --- 1,8 ---- using System; using System.Collections; using System.Text; + using Iesi.Collections; + using NHibernate.Persister; using NHibernate.Type; *************** *** 29,35 **** ! private static StringCollection expressionTerminators = new StringCollection(); //tokens that close a sub expression ! private static StringCollection expressionOpeners = new StringCollection(); //tokens that open a sub expression ! private static StringCollection booleanOperators = new StringCollection(); //tokens that would indicate a sub expression is a boolean expression private static IDictionary negations = new Hashtable(); --- 30,36 ---- ! private static ISet expressionTerminators = new HashedSet(); //tokens that close a sub expression ! private static ISet expressionOpeners = new HashedSet(); //tokens that open a sub expression ! private static ISet booleanOperators = new HashedSet(); //tokens that would indicate a sub expression is a boolean expression private static IDictionary negations = new Hashtable(); *************** *** 555,559 **** else { ! q.AppendWhereToken( new SqlCommand.SqlString(token) ); } } --- 556,566 ---- else { ! // a String.Empty can get passed in here. If that occurs ! // then don't create a new SqlString for it - just ignore ! // it since it adds nothing to the sql being generated. ! if( token!=null && token.Length>0) ! { ! q.AppendWhereToken( new SqlCommand.SqlString(token) ); ! } } } Index: PreprocessingParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/PreprocessingParser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PreprocessingParser.cs 14 Apr 2004 11:35:53 -0000 1.4 --- PreprocessingParser.cs 4 Dec 2004 22:41:20 -0000 1.5 *************** *** 1,6 **** using System; using System.Collections; - using System.Collections.Specialized; using System.Text; using NHibernate.Util; --- 1,8 ---- using System; using System.Collections; using System.Text; + + using Iesi.Collections; + using NHibernate.Util; *************** *** 11,35 **** public class PreprocessingParser : IParser { ! private static StringCollection operators; private static IDictionary collectionProps; static PreprocessingParser() { ! operators = new StringCollection(); ! operators.Add("<="); ! operators.Add(">="); ! operators.Add("=>"); ! operators.Add("=<"); ! operators.Add("!="); ! operators.Add("<>"); ! operators.Add("!#"); ! operators.Add("!~"); ! operators.Add("!<"); ! operators.Add("!>"); ! operators.Add("is not"); ! operators.Add("not like"); ! operators.Add("not in"); ! operators.Add("not between"); ! operators.Add("not exists"); collectionProps = new Hashtable(); --- 13,37 ---- public class PreprocessingParser : IParser { ! private static ISet operators; private static IDictionary collectionProps; static PreprocessingParser() { ! operators = new HashedSet(); ! operators.Add( "<=" ); ! operators.Add( ">=" ); ! operators.Add( "=>" ); ! operators.Add( "=<" ); ! operators.Add( "!=" ); ! operators.Add( "<>" ); ! operators.Add( "!#" ); ! operators.Add( "!~" ); ! operators.Add( "!<" ); ! operators.Add( "!>" ); ! operators.Add( "is not" ); ! operators.Add( "not like" ); ! operators.Add( "not in" ); ! operators.Add( "not between" ); ! operators.Add( "not exists" ); collectionProps = new Hashtable(); Index: SelectParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/SelectParser.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SelectParser.cs 30 Apr 2004 09:22:28 -0000 1.8 --- SelectParser.cs 4 Dec 2004 22:41:20 -0000 1.9 *************** *** 1,6 **** using System; - using System.Data; using System.Collections; ! using System.Collections.Specialized; using NHibernate; using NHibernate.Util; --- 1,8 ---- using System; using System.Collections; ! using System.Data; ! ! using Iesi.Collections; ! using NHibernate; using NHibernate.Util; *************** *** 18,28 **** private ArrayList aggregateFuncTokenList = new ArrayList(); private static IDictionary aggregateFunctions = new Hashtable(); ! private static StringCollection countArguments = new StringCollection(); static SelectParser() { ! countArguments.Add("distinct"); ! countArguments.Add("all"); ! countArguments.Add("*"); } --- 20,30 ---- private ArrayList aggregateFuncTokenList = new ArrayList(); private static IDictionary aggregateFunctions = new Hashtable(); ! private static ISet countArguments = new HashedSet(); static SelectParser() { ! countArguments.Add( "distinct" ); ! countArguments.Add( "all" ); ! countArguments.Add( "*" ); } Index: HavingParser.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Hql/HavingParser.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HavingParser.cs 30 Apr 2004 08:57:59 -0000 1.6 --- HavingParser.cs 4 Dec 2004 22:41:19 -0000 1.7 *************** *** 13,19 **** { } protected override void AppendToken(QueryTranslator q, string token) { ! q.AppendHavingToken(token); } } --- 13,26 ---- { } + protected override void AppendToken(QueryTranslator q, string token) { ! // a String.Empty can get passed in here. If that occurs ! // then don't create a new SqlString for it - just ignore ! // it since it adds nothing to the sql being generated. ! if( token!=null && token.Length>0 ) ! { ! q.AppendHavingToken(token); ! } } } |