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: Michael D. <mik...@us...> - 2004-12-09 17:53:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18805/NHibernate/Id Modified Files: IdentityGenerator.cs IIdentifierGenerator.cs Log Message: Some comments added. Index: IIdentifierGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IIdentifierGenerator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IIdentifierGenerator.cs 28 Mar 2004 06:06:40 -0000 1.2 --- IIdentifierGenerator.cs 9 Dec 2004 17:53:14 -0000 1.3 *************** *** 7,11 **** /// <summary> /// The general contract between a class that generates unique ! /// identifiers and the <c>ISession</c>. /// </summary> /// <remarks> --- 7,11 ---- /// <summary> /// The general contract between a class that generates unique ! /// identifiers and the <see cref="ISession"/>. /// </summary> /// <remarks> *************** *** 32,36 **** /// Generate a new identifier /// </summary> ! /// <param name="session"></param> /// <param name="obj">The entity for which the id is being generate</param> /// <returns>The new identifier</returns> --- 32,36 ---- /// Generate a new identifier /// </summary> ! /// <param name="session">The <see cref="ISessionImplementor"/> this id is being generated in.</param> /// <param name="obj">The entity for which the id is being generate</param> /// <returns>The new identifier</returns> Index: IdentityGenerator.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IdentityGenerator.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IdentityGenerator.cs 22 Apr 2003 23:47:34 -0000 1.2 --- IdentityGenerator.cs 9 Dec 2004 17:53:14 -0000 1.3 *************** *** 2,23 **** using NHibernate.Engine; ! namespace NHibernate.Id { /// <summary> ! /// The general contract between a class that generates unique ! /// identifiers and the <c>Session</c>. It is not intended that ! /// this interface ever be exposed to the application. It <b>is</b> ! /// intended that users implement this interface to provide ! /// custom identifier generation strategies. ! /// ! /// Implementors should provide a public default constructor. ! /// ! /// Implementations that accept configuration parameters should ! /// also implement <c>Configurable</c>. ! /// ! /// Implementors MUST be threadsafe. /// </summary> ! public class IdentityGenerator : IIdentifierGenerator { ! ! public object Generate(ISessionImplementor s, object obj) { return null; } --- 2,36 ---- using NHibernate.Engine; ! namespace NHibernate.Id ! { /// <summary> ! /// Indicates to the <see cref="ISession"/> that identity ! /// (ie. identity/autoincrement column) key generation should be used. /// </summary> ! /// <remarks> ! /// <para> ! /// This id generation strategy is specified in the mapping file as ! /// <c><generator class="identity"></c> ! /// </para> ! /// <para> ! /// This indicates to NHibernate that the database generates the id when ! /// the entity is inserted. ! /// </para> ! /// </remarks> ! public class IdentityGenerator : IIdentifierGenerator ! { ! /// <summary> ! /// This class can not generate the <c>id</c>. It has to get the ! /// value from the database. ! /// </summary> ! /// <param name="s">The <see cref="ISessionImplementor"/> this id is being generated in.</param> ! /// <param name="obj">The entity the id is being generated for.</param> ! /// <returns> ! /// <c>null</c> because this <see cref="IIdentifierGenerator"/> can not generate ! /// an id. The entity must be inserted into the database to get the database ! /// generated id. ! /// </returns> ! public object Generate(ISessionImplementor s, object obj) ! { return null; } |
From: Michael D. <mik...@us...> - 2004-12-09 17:52:28
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18504/Proxy Modified Files: LazyInitializer.cs Added Files: INHibernateProxy.cs IProxyGenerator.cs NHibernateProxyHelper.cs ProxyGeneratorFactory.cs Removed Files: HibernateProxy.cs HibernateProxyHelper.cs IHibernateProxy.cs Log Message: Migrated most Proxy items from proxy branch to this one. Have not moved the actual proxy code. Will do that when the serialization bug in DynamicProxy is fixed. --- NEW FILE: NHibernateProxyHelper.cs --- using System; namespace NHibernate.Proxy { /// <summary> /// NHibernateProxyHelper provides convenience methods for working with /// objects that might be instances of Classes or the Proxied version of /// the Class. /// </summary> public sealed class NHibernateProxyHelper { private NHibernateProxyHelper() { //can't instantiate } /// <summary> /// Gets the NLazyInitializer that is used by the Proxy. /// </summary> /// <param name="proxy">The Proxy object</param> /// <returns>A reference to NLazyInitializer that contains the details of the Proxied object.</returns> public static LazyInitializer GetLazyInitializer(INHibernateProxy proxy) { LazyInitializer li = ProxyGeneratorFactory.GetProxyGenerator().GetLazyInitializer( proxy ); return li; } /// <summary> /// Convenience method to figure out the underlying type for the object regardless of it /// is a Proxied object or the real object. /// </summary> /// <param name="obj">The object to get the type of.</param> /// <returns>The Underlying Type for the object regardless of if it is a Proxy.</returns> public static System.Type GetClass(object obj) { if (obj is INHibernateProxy) { INHibernateProxy proxy = (INHibernateProxy) obj; LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer( proxy ); return li.PersistentClass; } else { return obj.GetType(); } } } } --- IHibernateProxy.cs DELETED --- --- NEW FILE: IProxyGenerator.cs --- using System; using System.Reflection; using NHibernate.Engine; namespace NHibernate.Proxy { /// <summary> /// Summary description for IProxyGenerator. /// </summary> public interface IProxyGenerator { /// <summary> /// Build a proxy using the Castle.DynamicProxy library. /// </summary> /// <param name="persistentClass">The PersistentClass to proxy.</param> /// <param name="interfaces">The extra interfaces the Proxy should implement.</param> /// <param name="identifierPropertyInfo">The PropertyInfo to get/set the Id.</param> /// <param name="id">The value for the Id.</param> /// <param name="session">The Session the proxy is in.</param> /// <returns>A fully built <c>INHibernateProxy</c>.</returns> INHibernateProxy GetProxy(System.Type persistentClass, System.Type concreteProxy, System.Type[] interfaces, PropertyInfo identifierPropertyInfo, object id, ISessionImplementor session); /// <summary> /// Gets the <see cref="LazyInitializer"/> that is used by the Proxy. /// </summary> /// <param name="proxy">The Proxy object</param> /// <returns>The <see cref="LazyInitializer"/> that contains the details of the Proxied object.</returns> LazyInitializer GetLazyInitializer(INHibernateProxy proxy); /// <summary> /// Convenience method to figure out the underlying type for the object regardless of it /// is a Proxied object or the real object. /// </summary> /// <param name="obj">The object to get the type of.</param> /// <returns>The Underlying Type for the object regardless of if it is a Proxy.</returns> System.Type GetClass(object obj); } } --- NEW FILE: INHibernateProxy.cs --- using System; using System.Runtime.Serialization; namespace NHibernate.Proxy { /// <summary> /// A marker interface so NHibernate can know if it is dealing with /// an object that is a Proxy. /// </summary> /// <remarks> /// This interface should not be implemented by anything other than /// the Dynamically generated Proxy. It has to be public scope because /// the Proxies are created in a seperate DLL than NHibernate. /// </remarks> public interface INHibernateProxy { } } Index: LazyInitializer.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Proxy/LazyInitializer.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LazyInitializer.cs 21 Nov 2004 22:56:30 -0000 1.2 --- LazyInitializer.cs 9 Dec 2004 17:52:16 -0000 1.3 *************** *** 1,171 **** using System; using System.Reflection; using NHibernate.Engine; using NHibernate.Util; - using log4net; - namespace NHibernate.Proxy { /// <summary> ! /// Summary description for LazyInitializer. /// </summary> ! public abstract class LazyInitializer { ! protected static readonly object INVOKE_IMPLEMENTATION = new object(); ! ! private object target = null; ! private object id; ! private ISessionImplementor session; ! private System.Type persistentClass; ! private MethodInfo getIdentifierMethod; ! private bool overridesEquals; ! public LazyInitializer(System.Type persistentClass, object id, MethodInfo getIdentifierMethod, ISessionImplementor session) { ! this.id = id; ! this.session = session; ! this.persistentClass = persistentClass; ! this.getIdentifierMethod = getIdentifierMethod; ! overridesEquals = ReflectHelper.OverridesEquals(persistentClass); ! } ! public void Initialize() { ! if (target==null) { ! if ( session==null ) { ! throw new HibernateException("Could not initialize proxy - no Session"); } ! else if ( !session.IsOpen ) { ! throw new HibernateException("Could not initialize proxy - the owning Session was closed"); } ! else { ! target = session.ImmediateLoad(persistentClass, id); } } } ! private void InitializeWrapExceptions() { ! try { Initialize(); } ! catch (Exception e) { ! LogManager.GetLogger( typeof(LazyInitializer) ).Error("Exception initializing proxy", e); throw new LazyInitializationException(e); } } ! protected abstract object SerializableProxy(); ! protected object Invoke(MethodInfo method, object[] args) { ! ! string methodName = method.Name; ! int pars = method.GetParameters().Length; ! if ( pars==0 ) { ! if ( "WriteReplace".Equals(methodName) ) { ! if (target==null && session!=null ) target = session.GetEntity( ! new Key( id, session.Factory.GetPersister(persistentClass) ) ! ); ! if (target==null) { ! /*if ( session==null || !session.isOpen() ) { ! return session.getFactory().getPersister(persistentClass).instantiate(id); //A little "empty" object ! } ! else {*/ ! return SerializableProxy(); ! //} } ! else { ! return target; } - - } - else if ( !overridesEquals && getIdentifierMethod!=null && "GetHashCode".Equals(methodName) ) { - // kinda dodgy, since it redefines the hashcode of the proxied object. - // but necessary if we are to keep proxies in HashSets without - // forcing them to be initialized - return id.GetHashCode(); - } - else if ( method.Equals(getIdentifierMethod) ) { - return id; - } - else if ( "Finalize".Equals( methodName ) ) { - return null; } - } ! else if ( pars==1 && !overridesEquals && getIdentifierMethod!=null && "Equals".Equals(methodName) ) { ! // less dodgy because Hibernate forces == to be same as identifier equals ! return (bool) id.Equals( getIdentifierMethod.Invoke( args[0], null ) ); ! } ! ! // otherwise: ! return INVOKE_IMPLEMENTATION; ! /*try { ! return method.invoke( getImplementation(), args ); ! } ! catch (InvocationTargetException ite) { ! throw ite.getTargetException(); ! }*/ } ! public object Identifier { ! get { ! return id; } ! } ! ! public System.Type PersistentClass { ! get { ! return persistentClass; } ! } ! ! public bool IsUninitialized { ! get { ! return target == null; } ! } ! ! public ISessionImplementor Session { ! get { ! return session; } ! } ! ! public void SetSession(ISessionImplementor s) { ! if (s!=session) { ! if ( session!=null && session.IsOpen ) { ! //TODO: perhaps this should be some other RuntimeException... ! throw new LazyInitializationException("Illegally attempted to associate a proxy with two open Sessions"); ! } ! else { ! session = s; ! } } - } - /// <summary> - /// Return the underlying persistent object, initializing if necessary - /// </summary> - public object GetImplementation() { - InitializeWrapExceptions(); - return target; - } - - /// <summary> - /// Return the underlying persistent object in the given Session, or null - /// </summary> - /// <param name="s"></param> - /// <returns></returns> - public object GetImplementation(ISessionImplementor s) { - return s.GetEntity( new Key( - Identifier, - s.Factory.GetPersister( PersistentClass ) - ) ); } } ! } \ No newline at end of file --- 1,232 ---- using System; + using System.Collections; using System.Reflection; + using System.Runtime.Serialization; using NHibernate.Engine; using NHibernate.Util; namespace NHibernate.Proxy { /// <summary> ! /// Provides the base functionallity to Handle Member calls into a dynamically ! /// generated NHibernate Proxy. /// </summary> ! /// <remarks> ! /// This could be an extension point later if the .net framework ever gets a Proxy ! /// class that is similar to the java.lang.reflect.Proxy or if a library similar ! /// to cglib was made in .net. ! /// </remarks> ! [Serializable] ! public abstract class LazyInitializer { ! /// <summary> ! /// If this is returned by Invoke then the subclass needs to Invoke the ! /// method call against the object that is being proxied. ! /// </summary> ! protected static readonly object InvokeImplementation = new object(); ! private object _target = null; ! private object _id; ! [NonSerialized] ! private ISessionImplementor _session; ! private System.Type _persistentClass; ! private PropertyInfo _identifierPropertyInfo; ! private bool _overridesEquals; ! /// <summary> ! /// Create a LazyInitializer to handle all of the Methods/Properties that are called ! /// on the Proxy. ! /// </summary> ! /// <param name="persistentClass">The Class to Proxy.</param> ! /// <param name="id">The Id of the Object we are Proxying.</param> ! /// <param name="identifierPropertyInfo">The PropertyInfo for the <id> property.</param> ! /// <param name="session">The ISession this Proxy is in.</param> ! protected LazyInitializer(System.Type persistentClass, object id, PropertyInfo identifierPropertyInfo, ISessionImplementor session) ! { ! _persistentClass = persistentClass; ! _id = id; ! _session = session; ! _identifierPropertyInfo = identifierPropertyInfo; ! _overridesEquals = ReflectHelper.OverridesEquals(_persistentClass); ! } ! ! /// <summary> ! /// Perform an ImmediateLoad of the actual object for the Proxy. ! /// </summary> ! /// <exception cref="HibernateException"> ! /// Thrown when the Proxy has no Session or the Session is not open. ! /// </exception> ! public void Initialize() ! { ! if( _target==null ) ! { ! if( _session==null ) ! { ! throw new HibernateException( "Could not initialize proxy - no Session." ); } ! else if( _session.IsOpen==false ) ! { ! throw new HibernateException( "Could not initialize proxy - the owning Session was closed." ); } ! else ! { ! _target = _session.ImmediateLoad( _persistentClass, _id ); } } } ! /// <summary> ! /// Initializes the Proxy. ! /// </summary> ! /// <remarks> ! /// If an Exception is thrown then it will be logged and wrapped into a ! /// <see cref="LazyInitializationException" />. ! /// </remarks> ! /// <exception cref="LazyInitializationException"> ! /// Thrown whenever a problem is encountered during the Initialization of the Proxy. ! /// </exception> ! private void InitializeWrapExceptions() ! { ! try ! { Initialize(); } ! catch( Exception e ) ! { ! log4net.LogManager.GetLogger(typeof(LazyInitializer)).Error("Exception initializing proxy.", e); throw new LazyInitializationException(e); } } ! /// <summary> ! /// Adds all of the information into the SerializationInfo that is needed to ! /// reconstruct the proxy during deserialization or to replace the proxy ! /// with the instantiated target. ! /// </summary> ! /// <param name="info">The <see cref="SerializationInfo"/> to write the object to.</param> ! protected virtual void AddSerializationInfo(SerializationInfo info) ! { ! } ! public object Identifier ! { ! get { return _id; } ! } ! public System.Type PersistentClass ! { ! get { return _persistentClass; } ! } ! public bool IsUninitialized ! { ! get { return (_target==null); } ! } ! public ISessionImplementor Session ! { ! get { return _session; } ! set ! { ! if(value!=_session) ! { ! if( _session!=null && _session.IsOpen ) ! { ! //TODO: perhaps this should be some other RuntimeException... ! throw new LazyInitializationException("Illegally attempted to associate a proxy with two open Sessions"); } ! else ! { ! _session = value; } } } ! } ! /// <summary> ! /// Return the Underlying Persistent Object, initializing if necessary. ! /// </summary> ! /// <returns>The Persistent Object this proxy is Proxying.</returns> ! public object GetImplementation() ! { ! InitializeWrapExceptions(); ! return _target; ! } + /// <summary> + /// Return the Underlying Persistent Object in a given <see cref="ISession"/>, or null. + /// </summary> + /// <param name="s">The Session to get the object from.</param> + /// <returns>The Persistent Object this proxy is Proxying, or <c>null</c>.</returns> + public object GetImplementation(ISessionImplementor s) + { + Key key = new Key( Identifier, s.Factory.GetPersister(PersistentClass) ); + return s.GetEntity(key); } ! /// <summary> ! /// Invokes the method if this is something that the LazyInitializer can handle ! /// without the underlying proxied object being instantiated. ! /// </summary> ! /// <param name="methodName">The name of the method/property to Invoke.</param> ! /// <param name="args">The arguments to pass the method/property.</param> ! /// <returns> ! /// The result of the Invoke if the underlying proxied object is not needed. If the ! /// underlying proxied object is needed then it returns the result <see cref="InvokeImplementation"/> ! /// which indicates that the Proxy will need to forward to the real implementation. ! /// </returns> ! public virtual object Invoke(MethodBase method, params object[] args) ! { ! // all Proxies must implement INHibernateProxy which extends ISerializable ! // not true anymore - DynamicProxy now handles the serialization. All Proxy ! // Generators should make sure that ISerializable is implemented if their ! // Proxy doesn't do it by default. ! if( method.Name.Equals("GetObjectData") ) ! { ! SerializationInfo info = (SerializationInfo)args[0]; ! StreamingContext context = (StreamingContext)args[1]; ! ! if( _target==null & _session!=null ) ! { ! Key key = new Key(_id, _session.Factory.GetPersister( _persistentClass ) ); ! _target = _session.GetEntity( key ); ! } ! ! // let the specific LazyInitializer write its requirements for deserialization ! // into the stream. ! AddSerializationInfo( info ); ! ! // don't need a return value for proxy. ! return null; } ! else if( !_overridesEquals && _identifierPropertyInfo!=null && method.Name.Equals("GetHashCode") ) ! { ! // kinda dodgy, since it redefines the hashcode of the proxied object. ! // but necessary if we are to keep proxies in HashSets without ! // forcing them to be initialized ! return _id.GetHashCode(); } ! else if( _identifierPropertyInfo!=null && method.Equals( _identifierPropertyInfo.GetGetMethod(true) ) ) ! { ! return _id; } ! else if( method.Name.Equals( "Dispose" ) ) ! { ! return null; } ! ! else if ( args.Length==1 && !_overridesEquals && _identifierPropertyInfo!=null && method.Name.Equals( "Equals" ) ) ! { ! // less dodgy because NHibernate forces == to be the same as Identifier Equals ! return _id.Equals( _identifierPropertyInfo.GetValue( _target, null ) ); ! } ! ! else ! { ! return InvokeImplementation; } } } ! } --- HibernateProxy.cs DELETED --- --- NEW FILE: ProxyGeneratorFactory.cs --- using System; using System.Reflection; //TODO: build a version //using Castle.DynamicProxy; using NHibernate.Engine; namespace NHibernate.Proxy { /// <summary> /// A Factory for getting the ProxyGenerator. /// </summary> public sealed class ProxyGeneratorFactory { private static readonly log4net.ILog log = log4net.LogManager.GetLogger( typeof(ProxyGeneratorFactory) ); //TODO: build a version private static IProxyGenerator _generator = null;// new CastleProxyGenerator(); public static IProxyGenerator GetProxyGenerator() { //TODO: make this read from a configuration file!!! At this point anybody // could substitue in their own IProxyGenerator and LazyInitializer. return _generator; } } } --- HibernateProxyHelper.cs DELETED --- |
From: Michael D. <mik...@us...> - 2004-12-09 17:52:26
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18504 Modified Files: NHibernate-1.1.csproj NHibernate.cs Log Message: Migrated most Proxy items from proxy branch to this one. Have not moved the actual proxy code. Will do that when the serialization bug in DynamicProxy is fixed. Index: NHibernate-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate-1.1.csproj,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** NHibernate-1.1.csproj 27 Nov 2004 03:42:16 -0000 1.61 --- NHibernate-1.1.csproj 9 Dec 2004 17:52:14 -0000 1.62 *************** *** 1365,1374 **** /> <File ! RelPath = "Proxy\HibernateProxy.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Proxy\HibernateProxyHelper.cs" SubType = "Code" BuildAction = "Compile" --- 1365,1374 ---- /> <File ! RelPath = "Proxy\INHibernateProxy.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "Proxy\IProxyGenerator.cs" SubType = "Code" BuildAction = "Compile" *************** *** 1380,1383 **** --- 1380,1393 ---- /> <File + RelPath = "Proxy\NHibernateProxyHelper.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Proxy\ProxyGeneratorFactory.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "SqlCommand\Alias.cs" SubType = "Code" Index: NHibernate.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NHibernate.cs 25 Aug 2004 03:59:07 -0000 1.22 --- NHibernate.cs 9 Dec 2004 17:52:14 -0000 1.23 *************** *** 245,257 **** /// <exception cref="HibernateException">if we can't initialize the proxy at this time, eg. the Session was closed</exception> public static void Initialize(object proxy) { ! if (proxy==null) { return; } ! else if ( proxy is HibernateProxy ) { ! HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) proxy ).Initialize(); } ! else if ( proxy is PersistentCollection ) { ( (PersistentCollection) proxy ).ForceLoad(); --- 245,257 ---- /// <exception cref="HibernateException">if we can't initialize the proxy at this time, eg. the Session was closed</exception> public static void Initialize(object proxy) { ! if( proxy==null ) { return; } ! else if( proxy is INHibernateProxy ) { ! NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) proxy ).Initialize(); } ! else if( proxy is PersistentCollection ) { ( (PersistentCollection) proxy ).ForceLoad(); *************** *** 266,272 **** public static bool IsInitialized(object proxy) { ! if ( proxy is HibernateProxy ) { ! return !HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) proxy ).IsUninitialized; } else if ( proxy is PersistentCollection ) --- 266,272 ---- public static bool IsInitialized(object proxy) { ! if ( proxy is INHibernateProxy ) { ! return !NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) proxy ).IsUninitialized; } else if ( proxy is PersistentCollection ) *************** *** 288,294 **** public System.Type GetClass(object proxy) { ! if(proxy is HibernateProxy) { ! return HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) proxy ).GetImplementation().GetType(); } else --- 288,294 ---- public System.Type GetClass(object proxy) { ! if(proxy is INHibernateProxy) { ! return NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) proxy ).GetImplementation().GetType(); } else |
From: Michael D. <mik...@us...> - 2004-12-09 17:52:25
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18504/Impl Modified Files: QueryImpl.cs SessionImpl.cs Log Message: Migrated most Proxy items from proxy branch to this one. Have not moved the actual proxy code. Will do that when the serialization bug in DynamicProxy is fixed. Index: SessionImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/SessionImpl.cs,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** SessionImpl.cs 4 Dec 2004 22:41:21 -0000 1.54 --- SessionImpl.cs 9 Dec 2004 17:52:15 -0000 1.55 *************** *** 49,52 **** --- 49,61 ---- private IDictionary proxiesByKey; //key=Key, value=HibernateProxy + // these are used to serialize the proxiesByKey Dictionary - I was not able to + // have a Hashtable serialize fully by the time that SessionImpl OnDeserialization + // was getting called - I think I'm not completely understanding the sequence of + // deserialization events. When SessionImpl was getting the OnDeserialization called + // the proxies were not fully deserialized. + private ArrayList tmpProxiesKey; + private ArrayList tmpProxiesProxy; + + //IdentityMaps are serializable in NH private IdentityMap entries;//key=Object, value=EntityEntry *************** *** 628,632 **** this.callAfterTransactionCompletionFromDisconnect = info.GetBoolean("callAfterTransactionCompletionFromDisconnect"); this.entitiesByKey = (IDictionary)info.GetValue( "entitiesByKey", typeof(IDictionary) ); ! this.proxiesByKey = (IDictionary)info.GetValue( "proxiesByKey", typeof(IDictionary) ); this.nullifiables = (ISet)info.GetValue( "nullifiables", typeof(ISet) ); this.interceptor = (IInterceptor)info.GetValue( "interceptor", typeof(IInterceptor) ); --- 637,646 ---- this.callAfterTransactionCompletionFromDisconnect = info.GetBoolean("callAfterTransactionCompletionFromDisconnect"); this.entitiesByKey = (IDictionary)info.GetValue( "entitiesByKey", typeof(IDictionary) ); ! ! // we did not actually serializing the IDictionary but instead the proxies in an arraylist ! //this.proxiesByKey = (IDictionary)info.GetValue( "proxiesByKey", typeof(IDictionary) ); ! tmpProxiesKey = (ArrayList)info.GetValue( "tmpProxiesKey", typeof(ArrayList) ); ! tmpProxiesProxy = (ArrayList)info.GetValue( "tmpProxiesProxy", typeof(ArrayList) ); ! this.nullifiables = (ISet)info.GetValue( "nullifiables", typeof(ISet) ); this.interceptor = (IInterceptor)info.GetValue( "interceptor", typeof(IInterceptor) ); *************** *** 650,659 **** void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { ! if ( IsConnected ) throw new InvalidOperationException("Cannot serialize a Session while connected"); ! if ( insertions.Count!=0 || deletions.Count!=0 ) throw new InvalidOperationException("Cannot serialize a Session which has work waiting to be flushed"); - log.Info("serializing session"); - info.AddValue( "factory", factory, typeof(SessionFactoryImpl) ); info.AddValue( "autoClose", autoClose ); --- 664,679 ---- void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { ! log.Info( "writting session to serializer" ); ! ! if ( IsConnected ) ! { ! throw new InvalidOperationException("Cannot serialize a Session while connected"); ! } ! ! if ( insertions.Count!=0 || deletions.Count!=0 ) ! { throw new InvalidOperationException("Cannot serialize a Session which has work waiting to be flushed"); + } info.AddValue( "factory", factory, typeof(SessionFactoryImpl) ); info.AddValue( "autoClose", autoClose ); *************** *** 663,667 **** info.AddValue( "callAfterTransactionCompletionFromDisconnect", callAfterTransactionCompletionFromDisconnect ); info.AddValue( "entitiesByKey", entitiesByKey, typeof(IDictionary) ); ! info.AddValue( "proxiesByKey", proxiesByKey, typeof(IDictionary) ); info.AddValue( "nullifiables", nullifiables, typeof(ISet) ); info.AddValue( "interceptor", interceptor, typeof(IInterceptor) ); --- 683,702 ---- info.AddValue( "callAfterTransactionCompletionFromDisconnect", callAfterTransactionCompletionFromDisconnect ); info.AddValue( "entitiesByKey", entitiesByKey, typeof(IDictionary) ); ! ! // the IDictionary should not be serialized because the objects inside of it are not ! // fully deserialized until after the session is deserialized. Instead use two ArrayList ! // to hold the values because they don't have the deserialization complexities that ! // hashtables do. ! tmpProxiesKey = new ArrayList( proxiesByKey.Count ); ! tmpProxiesProxy = new ArrayList( proxiesByKey.Count ); ! foreach(DictionaryEntry de in proxiesByKey) ! { ! tmpProxiesKey.Add( de.Key ); ! tmpProxiesProxy.Add( de.Value ); ! } ! ! info.AddValue( "tmpProxiesKey", tmpProxiesKey ); ! info.AddValue( "tmpProxiesProxy", tmpProxiesProxy ); ! info.AddValue( "nullifiables", nullifiables, typeof(ISet) ); info.AddValue( "interceptor", interceptor, typeof(IInterceptor) ); *************** *** 682,686 **** void IDeserializationCallback.OnDeserialization(Object sender) { ! log.Info("deserializing session"); // don't need any section for IdentityMaps because .net does not have a problem --- 717,721 ---- void IDeserializationCallback.OnDeserialization(Object sender) { ! log.Info("OnDeserialization of the session."); // don't need any section for IdentityMaps because .net does not have a problem *************** *** 702,721 **** } } ! ! // TODO: figure out why proxies are having problems. The enumerator appears to be throwing ! // a null reference exception when the proxiesByKey.Count==0 ! // foreach(object proxy in proxiesByKey.Values) ! // { ! // object proxy = proxyEnumer.Current; ! // if (proxy is HibernateProxy) ! // { ! // HibernateProxyHelper.GetLazyInitializer(proxy as HibernateProxy).SetSession(this); ! // } ! // else ! // { ! // // the proxy was pruned during the serialization process ! // proxiesByKey.Remove(proxy); ! // } ! // } foreach(EntityEntry e in entries.Values) --- 737,773 ---- } } ! ! // recreate the proxiesByKey hashtable from the two arraylists. ! proxiesByKey = new Hashtable( tmpProxiesKey.Count ); ! for(int i=0; i<tmpProxiesKey.Count; i++) ! { ! proxiesByKey.Add( tmpProxiesKey[i], tmpProxiesProxy[i] ); ! } ! ! // we can't remove an entry from an IDictionary while enumerating so store the ones ! // to remove in this list ! ArrayList keysToRemove = new ArrayList(); ! ! foreach( DictionaryEntry de in proxiesByKey ) ! { ! object key = de.Key; ! object proxy = de.Value; ! ! if (proxy is INHibernateProxy) ! { ! NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy)proxy ).Session = this; ! } ! else ! { ! // the proxy was pruned during the serialization process because ! // the target had been instantiated. ! keysToRemove.Add( key ); ! } ! } ! ! for( int i=0; i<keysToRemove.Count; i++ ) ! { ! proxiesByKey.Remove( keysToRemove[i] ); ! } foreach(EntityEntry e in entries.Values) *************** *** 849,856 **** public LockMode GetCurrentLockMode(object obj) { ! if ( obj is HibernateProxy ) { ! obj = (HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj)).GetImplementation(this); ! if (obj==null) return LockMode.None; } --- 901,908 ---- public LockMode GetCurrentLockMode(object obj) { ! if ( obj is INHibernateProxy ) { ! obj = (NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj)).GetImplementation(this); ! if( obj==null ) return LockMode.None; } *************** *** 973,977 **** { id = GetPersister(theObj).IdentifierGenerator.Generate(this, theObj); ! if( id == (object) IdentifierGeneratorFactory.ShortCircuitIndicator) return GetIdentifier(theObj); //TODO: yick! } catch (Exception ex) --- 1025,1032 ---- { id = GetPersister(theObj).IdentifierGenerator.Generate(this, theObj); ! if( id == (object) IdentifierGeneratorFactory.ShortCircuitIndicator) ! { ! return GetIdentifier(theObj); //TODO: yick! ! } } catch (Exception ex) *************** *** 1047,1051 **** if (old!=null) { ! if ( GetEntry(old).Status==Status.Deleted) { Flush(); --- 1102,1106 ---- if (old!=null) { ! if ( GetEntry(old).Status==Status.Deleted ) { Flush(); *************** *** 1125,1129 **** AddEntry(obj, Status.Loaded, values, id, Versioning.GetVersion(values, persister), LockMode.Write, identityCol, persister); ! if (!identityCol) insertions.Add( new ScheduledInsertion( id, values, obj, persister, this ) ); // cascade-save to collections AFTER the collection owner was saved --- 1180,1187 ---- AddEntry(obj, Status.Loaded, values, id, Versioning.GetVersion(values, persister), LockMode.Write, identityCol, persister); ! if (!identityCol) ! { ! insertions.Add( new ScheduledInsertion( id, values, obj, persister, this ) ); ! } // cascade-save to collections AFTER the collection owner was saved *************** *** 1143,1148 **** private void ReassociateProxy(Object value) { ! HibernateProxy proxy = (HibernateProxy) value; ! LazyInitializer li = HibernateProxyHelper.GetLazyInitializer(proxy); ReassociateProxy(li, proxy); } --- 1201,1206 ---- private void ReassociateProxy(Object value) { ! INHibernateProxy proxy = (INHibernateProxy) value; ! LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer(proxy); ReassociateProxy(li, proxy); } *************** *** 1150,1157 **** private object UnproxyAndReassociate(object maybeProxy) { ! if ( maybeProxy is HibernateProxy ) { ! HibernateProxy proxy = (HibernateProxy) maybeProxy; ! LazyInitializer li = HibernateProxyHelper.GetLazyInitializer(proxy); ReassociateProxy(li, proxy); return li.GetImplementation(); //initialize + unwrap the object --- 1208,1215 ---- private object UnproxyAndReassociate(object maybeProxy) { ! if ( maybeProxy is INHibernateProxy ) { ! INHibernateProxy proxy = (INHibernateProxy) maybeProxy; ! LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer(proxy); ReassociateProxy(li, proxy); return li.GetImplementation(); //initialize + unwrap the object *************** *** 1168,1172 **** /// <param name="li"></param> /// <param name="proxy"></param> ! private void ReassociateProxy(LazyInitializer li, HibernateProxy proxy) { if ( li.Session!=this ) --- 1226,1230 ---- /// <param name="li"></param> /// <param name="proxy"></param> ! private void ReassociateProxy(LazyInitializer li, INHibernateProxy proxy) { if ( li.Session!=this ) *************** *** 1174,1179 **** IClassPersister persister = GetPersister( li.PersistentClass ); Key key = new Key( li.Identifier, persister ); ! if ( !proxiesByKey.Contains(key) ) proxiesByKey[key] = proxy; // any earlier proxy takes precedence ! HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) proxy ).SetSession(this); } } --- 1232,1240 ---- IClassPersister persister = GetPersister( li.PersistentClass ); Key key = new Key( li.Identifier, persister ); ! if ( !proxiesByKey.Contains(key) ) ! { ! proxiesByKey[key] = proxy; // any earlier proxy takes precedence ! } ! NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) proxy ).Session = this; } } *************** *** 1239,1246 **** private bool IsUnsaved(object obj, bool earlyInsert, object self) { ! if ( obj is HibernateProxy ) { ! // if its an uninitialized proxy, it can't be transietn ! LazyInitializer li = HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ); if ( li.GetImplementation(this)==null ) { --- 1300,1307 ---- private bool IsUnsaved(object obj, bool earlyInsert, object self) { ! if ( obj is INHibernateProxy ) { ! // if its an uninitialized proxy, it can't be transient ! LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ); if ( li.GetImplementation(this)==null ) { *************** *** 1714,1722 **** if (obj==null) throw new NullReferenceException("attempted to update null"); ! if ( obj is HibernateProxy ) { ! object pid = HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ).Identifier; ! if( !id.Equals(pid) ) throw new HibernateException("The given proxy had a different identifier value to the given identifier: " + pid + "!=" + id); } --- 1775,1785 ---- if (obj==null) throw new NullReferenceException("attempted to update null"); ! if ( obj is INHibernateProxy ) { ! object pid = NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ).Identifier; ! if( !id.Equals( pid ) ) ! { throw new HibernateException("The given proxy had a different identifier value to the given identifier: " + pid + "!=" + id); + } } *************** *** 2108,2113 **** else { ! //TODO: Get the proxy - there is some CGLIB code here ! proxy = null; proxiesByKey[key] = proxy; --- 2171,2182 ---- else { ! IProxyGenerator generator = ProxyGeneratorFactory.GetProxyGenerator(); ! proxy = generator.GetProxy( ! p.MappedClass ! , p.ConcreteProxyClass ! , p.ProxyInterfaces ! , p.ProxyIdentifierProperty ! , key.Identifier ! , this ); proxiesByKey[key] = proxy; *************** *** 2309,2322 **** // return new uninitailzed proxy - //TODO: commented this out so we could get all of the test running - this basically makes - // the proxy of a class be ignored - which is fine until we have it working. if ( persister.HasProxy ) { ! proxy = null; //TODO: Create the proxy ! // this is the spot that is causing the problems with FooBarTest.FetchInitializedCollection ! // when the following code "Assert.IsTrue( baz.fooBag.Count==2 );" is being executed. This ! // is causing a null value to be returned when a "Proxied" version of the class is expected. ! // So the method ThrowObjectNotFound is throwing an exception because it is given a null object ! // - hence the error looks like it can't find a row in the DB. } proxiesByKey[key] = proxy; --- 2378,2385 ---- // return new uninitailzed proxy if ( persister.HasProxy ) { ! IProxyGenerator generator = ProxyGeneratorFactory.GetProxyGenerator(); ! proxy = generator.GetProxy( clazz, persister.ConcreteProxyClass, persister.ProxyInterfaces, persister.ProxyIdentifierProperty, id, this ); } proxiesByKey[key] = proxy; *************** *** 2737,2741 **** Status status = entry.Status; ! if (status != Status.Loading && status != Status.Gone) { object obj = me.Key; --- 2800,2804 ---- Status status = entry.Status; ! if( status!=Status.Loading && status!=Status.Gone ) { object obj = me.Key; *************** *** 2760,2764 **** object[] values; ! if ( status==Status.Deleted) { //grab its state saved at deletion --- 2823,2827 ---- object[] values; ! if( status==Status.Deleted ) { //grab its state saved at deletion *************** *** 2787,2791 **** int[] dirtyProperties = interceptor.FindDirty(obj, entry.Id, values, entry.LoadedState, persister.PropertyNames, types); ! if ( dirtyProperties==null ) { // interceptor returned null, so do the dirtycheck ourself, if possible --- 2850,2854 ---- int[] dirtyProperties = interceptor.FindDirty(obj, entry.Id, values, entry.LoadedState, persister.PropertyNames, types); ! if( dirtyProperties==null ) { // interceptor returned null, so do the dirtycheck ourself, if possible *************** *** 2830,2834 **** obj, entry.Id, values, entry.LoadedState, persister.PropertyNames, types); ! //no we might need to recalculate the dirtyProperties array if(intercepted && !cannotDirtyCheck && !interceptorHandledDirtyCheck) { --- 2893,2897 ---- obj, entry.Id, values, entry.LoadedState, persister.PropertyNames, types); ! //now we might need to recalculate the dirtyProperties array if(intercepted && !cannotDirtyCheck && !interceptorHandledDirtyCheck) { *************** *** 2940,2947 **** public object GetIdentifier(object obj) { ! if (obj is HibernateProxy) { ! LazyInitializer li = HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ); ! if ( li.Session!=this ) throw new TransientObjectException("The proxy was not associated with this session"); return li.Identifier; } --- 3003,3013 ---- public object GetIdentifier(object obj) { ! if (obj is INHibernateProxy) { ! LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ); ! if ( li.Session!=this ) ! { ! throw new TransientObjectException("The proxy was not associated with this session"); ! } return li.Identifier; } *************** *** 2962,2968 **** public object GetEntityIdentifier(object obj) { ! if (obj is HibernateProxy) { ! return HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ).Identifier; } else --- 3028,3034 ---- public object GetEntityIdentifier(object obj) { ! if( obj is INHibernateProxy ) { ! return NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ).Identifier; } else *************** *** 2975,2979 **** public bool IsSaved(object obj) { ! if(obj is HibernateProxy) return true; EntityEntry entry = GetEntry(obj); --- 3041,3045 ---- public bool IsSaved(object obj) { ! if(obj is INHibernateProxy) return true; EntityEntry entry = GetEntry(obj); *************** *** 3003,3009 **** if (obj==null) return null; ! if (obj is HibernateProxy) { ! return HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ).Identifier; } else --- 3069,3075 ---- if (obj==null) return null; ! if (obj is INHibernateProxy) { ! return NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ).Identifier; } else *************** *** 4049,4055 **** public bool Contains(object obj) { ! if (obj is HibernateProxy) { ! return HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ).Session==this; } else --- 4115,4121 ---- public bool Contains(object obj) { ! if (obj is INHibernateProxy) { ! return NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ).Session==this; } else *************** *** 4066,4072 **** public void Evict(object obj) { ! if (obj is HibernateProxy) { ! LazyInitializer li = HibernateProxyHelper.GetLazyInitializer( (HibernateProxy) obj ); object id = li.Identifier; IClassPersister persister = GetPersister( li.PersistentClass ); --- 4132,4138 ---- public void Evict(object obj) { ! if (obj is INHibernateProxy) { ! LazyInitializer li = NHibernateProxyHelper.GetLazyInitializer( (INHibernateProxy) obj ); object id = li.Identifier; IClassPersister persister = GetPersister( li.PersistentClass ); Index: QueryImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/QueryImpl.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** QueryImpl.cs 4 Nov 2004 04:46:13 -0000 1.16 --- QueryImpl.cs 9 Dec 2004 17:52:15 -0000 1.17 *************** *** 163,170 **** return this; } ! public IQuery SetEntity(int position, object val) { ! SetParameter(position, val, NHibernate.Entity( HibernateProxyHelper.GetClass(val))); return this; } public IQuery SetEnum(int position, System.Enum val) { SetParameter(position, val, NHibernate.Enum( val.GetType() ) ); --- 163,173 ---- return this; } ! ! public IQuery SetEntity(int position, object val) ! { ! SetParameter( position, val, NHibernate.Entity( NHibernateProxyHelper.GetClass( val ) ) ); return this; } + public IQuery SetEnum(int position, System.Enum val) { SetParameter(position, val, NHibernate.Enum( val.GetType() ) ); *************** *** 236,240 **** } public IQuery SetEntity(string name, object val) { ! SetParameter(name, val, NHibernate.Entity( HibernateProxyHelper.GetClass( val ) ) ); return this; } --- 239,243 ---- } public IQuery SetEntity(string name, object val) { ! SetParameter(name, val, NHibernate.Entity( NHibernateProxyHelper.GetClass( val ) ) ); return this; } *************** *** 255,259 **** private IType GuessType(object param) { ! System.Type clazz = HibernateProxyHelper.GetClass(param); return GuessType(clazz); } --- 258,262 ---- private IType GuessType(object param) { ! System.Type clazz = NHibernateProxyHelper.GetClass(param); return GuessType(clazz); } |
From: Michael D. <mik...@us...> - 2004-12-09 17:52:24
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18504/Persister Modified Files: AbstractEntityPersister.cs Log Message: Migrated most Proxy items from proxy branch to this one. Have not moved the actual proxy code. Will do that when the serialization bug in DynamicProxy is fixed. Index: AbstractEntityPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/AbstractEntityPersister.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** AbstractEntityPersister.cs 4 Dec 2004 22:41:22 -0000 1.28 --- AbstractEntityPersister.cs 9 Dec 2004 17:52:15 -0000 1.29 *************** *** 654,674 **** hasProxy = pi!=null; ArrayList pis = new ArrayList(); ! pis.Add(typeof(HibernateProxy)); ! //pis.Add( typeof(INHibernateProxy) ); // != null because we use arraylist instead of hashset // mono does not like a null value passed into Equals() if ( pi!=null && !mappedClass.Equals(pi) ) { pis.Add(pi); } concreteProxyClass = pi; ! if (hasProxy) { ! foreach(Subclass sc in model.SubclassCollection) { pi = sc.ProxyInterface; ! if (pi==null) throw new MappingException( "All subclasses must also have proxies: " + mappedClass.Name); ! if ( !sc.PersistentClazz.Equals(pi) ) pis.Add(pi); } } --- 654,687 ---- hasProxy = pi!=null; ArrayList pis = new ArrayList(); ! pis.Add( typeof(INHibernateProxy) ); ! // != null because we use arraylist instead of hashset // mono does not like a null value passed into Equals() if ( pi!=null && !mappedClass.Equals(pi) ) { + // if the <class> name="type" is not the same type as the proxy="type" + // then add the proxy's type to the list. They will + // be different types when the <class> is a class and the proxy is + // an interface, or when a <class> is an interface and the proxy interface + // is diff (why would you do that??). They will be the same type + // when the <class> is an interface and the proxy interface is the same + // interface. pis.Add(pi); } concreteProxyClass = pi; ! if( hasProxy ) { ! foreach( Subclass sc in model.SubclassCollection ) { pi = sc.ProxyInterface; ! if( pi==null ) ! { ! throw new MappingException( "All subclasses must also have proxies: " + mappedClass.Name); ! } ! if( !sc.PersistentClazz.Equals(pi) ) ! { ! pis.Add(pi); ! } } } |
From: Michael D. <mik...@us...> - 2004-12-08 15:35:03
|
Update of /cvsroot/nhibernate/nhibernate/src/Iesi.Collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10147/src/Iesi.Collections Modified Files: AssemblyInfo.cs Log Message: Forgot to comment out KeyFileAttribute Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/Iesi.Collections/AssemblyInfo.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AssemblyInfo.cs 8 Dec 2004 15:21:59 -0000 1.3 --- AssemblyInfo.cs 8 Dec 2004 15:34:53 -0000 1.4 *************** *** 25,28 **** [assembly: AssemblyInformationalVersionAttribute("1.0")] [assembly: AssemblyFileVersionAttribute("1.0.0.1")] ! [assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] --- 25,28 ---- [assembly: AssemblyInformationalVersionAttribute("1.0")] [assembly: AssemblyFileVersionAttribute("1.0.0.1")] ! //[assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] |
From: Michael D. <mik...@us...> - 2004-12-08 15:31:10
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9503/src/NHibernate Modified Files: NHibernate.build Log Message: Modified build files for new Iesi.Collections.Test and modified how clover enabled builds are run. Index: NHibernate.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/NHibernate.build,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NHibernate.build 27 Nov 2004 18:58:42 -0000 1.6 --- NHibernate.build 8 Dec 2004 15:30:54 -0000 1.7 *************** *** 18,21 **** --- 18,23 ---- * 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 nhibernate + * clover.db - location of the coverage db from the root of nhibernate --> *************** *** 29,38 **** <if propertytrue="clover.enabled"> - <mkdir dir="..\CloverBuild" /> <clover-setup ! initstring="..\CloverBuild\clover.cdb" ! builddir="..\CloverBuild" ! enabled="${clover.enabled}" ! flushinterval="1000" /> </if> --- 31,39 ---- <if propertytrue="clover.enabled"> <clover-setup ! initstring="..\..\${clover.db}" ! builddir="..\..\${clover.src}\${nant.project.name}" ! enabled="${clover.enabled}" ! flushinterval="1000" /> </if> *************** *** 96,119 **** </target> - <target name="coverage-report"> - - <if propertytrue="clover.enabled"> - - <mkdir dir="${build.dir}/clover" /> - <clover-setup - initstring="..\CloverBuild\clover.cdb" - builddir="..\CloverBuild" - enabled="${clover.enabled}" - flushinterval="1000" - /> - <clover-report> - <current title="NHibernate Clover Report" output="${build.dir}/clover" > - <format type="html" orderBy="Alpha" /> - </current> - </clover-report> - - </if> - - </target> - </project> \ No newline at end of file --- 97,99 ---- |
From: Michael D. <mik...@us...> - 2004-12-08 15:31:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Eg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9503/src/NHibernate.Eg Added Files: .cvsignore Log Message: Modified build files for new Iesi.Collections.Test and modified how clover enabled builds are run. --- NEW FILE: .cvsignore --- bin obj .#* *.user *.xsx |
From: Michael D. <mik...@us...> - 2004-12-08 15:31:07
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9503/src/NHibernate.Test Modified Files: NHibernate.Test.build Log Message: Modified build files for new Iesi.Collections.Test and modified how clover enabled builds are run. Index: NHibernate.Test.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/NHibernate.Test.build,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NHibernate.Test.build 27 Nov 2004 18:58:43 -0000 1.11 --- NHibernate.Test.build 8 Dec 2004 15:30:55 -0000 1.12 *************** *** 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 --> --- 15,18 ---- *************** *** 98,110 **** </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 --- 97,100 ---- |
From: Michael D. <mik...@us...> - 2004-12-08 15:31:05
|
Update of /cvsroot/nhibernate/nhibernate/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9503/src Modified Files: .cvsignore Log Message: Modified build files for new Iesi.Collections.Test and modified how clover enabled builds are run. Index: .cvsignore =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 27 Nov 2004 18:59:12 -0000 1.3 --- .cvsignore 8 Dec 2004 15:30:54 -0000 1.4 *************** *** 1,3 **** *.suo *.snk ! CloverBuild --- 1,3 ---- *.suo *.snk ! CloverSrc |
From: Michael D. <mik...@us...> - 2004-12-08 15:31:02
|
Update of /cvsroot/nhibernate/nhibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9503 Modified Files: NHibernateSolution.build Log Message: Modified build files for new Iesi.Collections.Test and modified how clover enabled builds are run. Index: NHibernateSolution.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/NHibernateSolution.build,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** NHibernateSolution.build 2 Dec 2004 20:50:41 -0000 1.19 --- NHibernateSolution.build 8 Dec 2004 15:30:53 -0000 1.20 *************** *** 16,19 **** --- 16,21 ---- --> <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" /> *************** *** 89,94 **** > <nant target="build" buildfile="src/HashCodeProvider/HashCodeProvider.build" /> ! <nant target="build" buildfile="src/Iesi.Collections/Iesi.Collections.build" /> ! </target> --- 91,96 ---- > <nant target="build" buildfile="src/HashCodeProvider/HashCodeProvider.build" /> ! <!-- the Iesi.Collections.build takes care of determining if this is a clover build or not --> ! <nant target="coverage-report" buildfile="src/Iesi.Collections/Iesi.Collections.build" /> </target> *************** *** 133,137 **** <copy todir="${build.dir}/bin"> <fileset basedir="${lib.dir}"> ! <includes name="Iesi.Collections.*" /> <includes name="log4net.*" /> <includes name="nunit.framework.*" /> --- 135,143 ---- <copy todir="${build.dir}/bin"> <fileset basedir="${lib.dir}"> ! <!-- ! excludes the Iesi.Collections because it is built during the build ! of NHibernate. It is in the lib folder for vs.net convenience ! --> ! <excludes name="Iesi.Collections.*" /> <includes name="log4net.*" /> <includes name="nunit.framework.*" /> *************** *** 139,142 **** --- 145,150 ---- </copy> + <nant target="build" buildfile="src/Iesi.Collections/Iesi.Collections.build" /> + <nant target="build" buildfile="src/Iesi.Collections.Test/Iesi.Collections.Test.build" /> <nant target="build" buildfile="src/NHibernate/NHibernate.build" /> <nant target="build" buildfile="src/NHibernate.DomainModel/NHibernate.DomainModel.build" /> *************** *** 172,175 **** --- 180,184 ---- <nant target="test" buildfile="src/NHibernate.Test/NHibernate.Test.build" /> + <nant target="test" buildfile="src/Iesi.Collections.Test/Iesi.Collections.Test.build" /> <!-- *************** *** 182,187 **** /> ! <!-- the NHibernate.build takes care of determining if this is a clover build or not --> ! <nant target="coverage-report" buildfile="src/NHibernate/NHibernate.build" /> </target> --- 191,220 ---- /> ! <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> ! ! <!-- 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="NHibernate Clover Report" output="${build.dir}/clover" > ! <format type="html" orderBy="Alpha" /> ! </current> ! </clover-report> </target> *************** *** 190,196 **** --- 223,231 ---- <assemblies basedir="${build.dir}/bin"> <includes name="NHibernate.dll" /> + <includes name="Iesi.Collections.dll" /> </assemblies> <summaries> <includes name="src/NHibernate/NamespaceSummary.xml" /> + <includes name="src/Iesi.Collections/NamespaceSummary.xml" /> </summaries> <documenters> *************** *** 261,265 **** --> <excludes name="src/UnitTesting/**" /> ! <excludes name="src/CloverBuild/**" /> <includes name="src/**" /> --- 296,300 ---- --> <excludes name="src/UnitTesting/**" /> ! <excludes name="${clover.src}/**" /> <includes name="src/**" /> |
From: Michael D. <mik...@us...> - 2004-12-08 15:22:14
|
Update of /cvsroot/nhibernate/nhibernate/src/Iesi.Collections In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8009/Iesi.Collections Modified Files: AssemblyInfo.cs Iesi.Collections-1.1.csproj Iesi.Collections.build Added Files: NamespaceSummary.xml Removed Files: NamespaceDoc.cs Log Message: Added test fixtures for Iesi.Collections --- NamespaceDoc.cs DELETED --- Index: Iesi.Collections-1.1.csproj =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/Iesi.Collections/Iesi.Collections-1.1.csproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Iesi.Collections-1.1.csproj 18 Nov 2004 02:40:45 -0000 1.1 --- Iesi.Collections-1.1.csproj 8 Dec 2004 15:21:59 -0000 1.2 *************** *** 124,130 **** /> <File ! RelPath = "NamespaceDoc.cs" ! SubType = "Code" ! BuildAction = "Compile" /> <File --- 124,129 ---- /> <File ! RelPath = "NamespaceSummary.xml" ! BuildAction = "Content" /> <File Index: Iesi.Collections.build =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/Iesi.Collections/Iesi.Collections.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Iesi.Collections.build 21 Nov 2004 22:53:09 -0000 1.2 --- Iesi.Collections.build 8 Dec 2004 15:21:59 -0000 1.3 *************** *** 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 nhibernate + * clover.db - location of the coverage db from the root of nhibernate --> + <if propertytrue="clover.enabled"> + <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> + </if> + <property name="keyFile" value="..\NHibernate.snk" /> <target name="build" description="Build Iesi.Collections"> + + <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" /> *************** *** 66,70 **** </csc> - </target> --- 83,86 ---- --- NEW FILE: NamespaceSummary.xml --- (This appears to be a binary file; contents omitted.) Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/Iesi.Collections/AssemblyInfo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AssemblyInfo.cs 21 Nov 2004 22:53:09 -0000 1.2 --- AssemblyInfo.cs 8 Dec 2004 15:21:59 -0000 1.3 *************** *** 6,10 **** // <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 --- 6,10 ---- // <autogenerated> // This code was generated by a tool. ! // Runtime Version: 1.1.4322.985 // // Changes to this file may cause incorrect behavior and will be lost if *************** *** 25,28 **** [assembly: AssemblyInformationalVersionAttribute("1.0")] [assembly: AssemblyFileVersionAttribute("1.0.0.1")] ! //[assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] --- 25,28 ---- [assembly: AssemblyInformationalVersionAttribute("1.0")] [assembly: AssemblyFileVersionAttribute("1.0.0.1")] ! [assembly: AssemblyKeyFileAttribute("..\\NHibernate.snk")] |
From: Michael D. <mik...@us...> - 2004-12-08 15:22:10
|
Update of /cvsroot/nhibernate/nhibernate/src/Iesi.Collections.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8009/Iesi.Collections.Test Added Files: AssemblyInfo.cs HashedSetFixture.cs HybridSetFixture.cs Iesi.Collections.Test-1.1.csproj Iesi.Collections.Test.build Iesi.Collections.Test.nunit ListSetFixture.cs SetFixture.cs SortedSetFixture.cs Log Message: Added test fixtures for Iesi.Collections --- NEW FILE: ListSetFixture.cs --- using System; using System.Collections; using Iesi.Collections; using NUnit.Framework; namespace Iesi.Collections.Test { /// <summary> /// Summary description for ListSetFixture. /// </summary> [TestFixture] public class ListSetFixture : SetFixture { protected override ISet CreateInstance() { return new ListSet(); } protected override ISet CreateInstance(ICollection init) { return new ListSet( init ); } protected override Type ExpectedType { get { return typeof(ListSet); } } } } --- NEW FILE: Iesi.Collections.Test.nunit --- <NUnitProject> <Settings activeconfig="Debug" /> <Config name="Debug" appbase="bin\Debug" binpathtype="Auto"> <assembly path="Iesi.Collections.Test.dll" /> </Config> <Config name="Release" appbase="bin\Release" binpathtype="Auto"> <assembly path="Iesi.Collections.Test.dll" /> </Config> </NUnitProject> --- NEW FILE: HashedSetFixture.cs --- using System; using System.Collections; using Iesi.Collections; using NUnit.Framework; namespace Iesi.Collections.Test { /// <summary> /// Summary description for HashedSetFixture. /// </summary> [TestFixture] public class HashedSetFixture : SetFixture { protected override ISet CreateInstance() { return new HashedSet(); } protected override ISet CreateInstance(ICollection init) { return new HashedSet( init ); } protected override Type ExpectedType { get { return typeof(HashedSet); } } [Test] public void Serialization() { // serialize and then deserialize the ISet. System.IO.Stream stream = new System.IO.MemoryStream(); System.Runtime.Serialization.IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); formatter.Serialize( stream, _set ); stream.Position = 0; ISet desSet = (ISet)formatter.Deserialize( stream ); stream.Close(); Assert.AreEqual( 3, desSet.Count, "should have des 3 items" ); Assert.IsTrue( desSet.Contains( one ), "should contain one" ); Assert.IsTrue( desSet.Contains( two ), "should contain two" ); Assert.IsTrue( desSet.Contains( three ), "should contain three" ); } } } --- NEW FILE: SetFixture.cs --- using System; using System.Collections; using Iesi.Collections; using NUnit.Framework; namespace Iesi.Collections.Test { /// <summary> /// Summary description for SetFixture. /// </summary> public abstract class SetFixture { private IList _aInitValues; private IList _bInitValues; protected ISet _set; public static object one = "one"; public static object two = "two"; public static object three = "three"; [SetUp] public virtual void SetUp() { _aInitValues = new ArrayList(); _aInitValues.Add( "zero" ); _aInitValues.Add( "one" ); _aInitValues.Add( "two" ); _aInitValues.Add( "three" ); _bInitValues = new ArrayList(); _bInitValues.Add( "two" ); _bInitValues.Add( "three" ); _bInitValues.Add( "four" ); _set = CreateInstance(); _set.Add( one ); _set.Add( two ); _set.Add( three ); } #region System.IClonable Member Tests [Test] public void Clone() { ISet clonedSet = (ISet)_set.Clone(); Assert.AreEqual( ExpectedType, clonedSet.GetType(), "cloned set should be the same type" ); Assert.AreEqual( _set.Count, clonedSet.Count, "set and cloned version should be same" ); clonedSet.Add( "not in original" ); Assert.IsFalse( _set.Count==clonedSet.Count, "adding to clone should not add to original." ); foreach( object obj in _set ) { Assert.IsTrue( clonedSet.Contains( obj ), "cloned set should have same objects as original set." ); } } #endregion #region System.Collections.ICollection Member Tests [Test] public void CopyTo() { object[] dest = new object[3]; _set.CopyTo( dest, 0 ); int count = 0; foreach( object obj in dest ) { Assert.IsTrue( _set.Contains( obj ), "set should contain the object in the array" ); count++; } Assert.AreEqual( 3, count, "should have 3 items in array" ); } [Test] public void Count() { Assert.AreEqual( 3, _set.Count, "should be 3 items" ); Assert.AreEqual( 0, CreateInstance().Count, "new set should have nothing in it." ); } #endregion #region Iesi.Collections.ISet Constructor Tests [Test] public void CtorWithDefaults() { ArrayList init = new ArrayList(3); init.Add( "one" ); init.Add( "two" ); init.Add( "three" ); ISet theSet = CreateInstance( init ); Assert.AreEqual( 3, init.Count, "3 items in set" ); int index = 0; foreach( object obj in init ) { Assert.IsTrue( theSet.Contains( obj ), "set should contain obj at index = " + index.ToString() ); index++; } } #endregion #region Iesi.Collections.ISet Member Tests [Test] public void Add() { Assert.IsTrue( _set.Add( "four" ), "should have added 'four'" ); Assert.AreEqual( 4, _set.Count, "should have added 'four'" ); Assert.IsFalse( _set.Add( two ), "'two' was already there" ); Assert.AreEqual( 4, _set.Count, "object already in set" ); } [Test] public void AddAll() { ArrayList addAll = new ArrayList(3); addAll.Add( "four" ); addAll.Add( "five" ); addAll.Add( "four" ); Assert.IsTrue( _set.AddAll( addAll ), "should have modified set" ); Assert.AreEqual( 5, _set.Count, "should have added one 'four' and 'five'" ); Assert.IsFalse( _set.AddAll( addAll ), "all elements already in set" ); } [Test] public void Clear() { _set.Clear(); Assert.AreEqual( 0, _set.Count, "should have no items in ISet." ); } [Test] public void Contains() { Assert.IsTrue( _set.Contains( one ), "does contain one" ); Assert.IsFalse( _set.Contains( "four" ), "does not contain 'four'" ); } [Test] public void ContainsAll() { ArrayList all = new ArrayList(2); all.Add( "one" ); all.Add( "two" ); Assert.IsTrue( _set.ContainsAll( all ), "should contain 'one' and 'two'" ); all.Add( "not in there" ); Assert.IsFalse( _set.ContainsAll( all ), "should not contain the just added 'not in there'" ); } [Test] public void ExclusiveOr() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = Set.ExclusiveOr( a, b ); Assert.AreEqual( 3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); ISet aNull = Set.ExclusiveOr( a, null ); Assert.AreEqual( _aInitValues.Count, aNull.Count, "count still same" ); Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "all A elements kept" ); ISet bNull = Set.ExclusiveOr( null, b ); Assert.AreEqual( _bInitValues.Count, bNull.Count, "count still same" ); Assert.IsTrue( bNull.ContainsAll( _bInitValues ), "all B elements kept" ); ISet bothNull = Set.ExclusiveOr( null, null ); Assert.AreEqual( null, bothNull, "two null sets return null set" ); } [Test] public void Intersect() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = Set.Intersect( a, b ); Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'two', and 'three'" ); Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" ); Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); ISet aNull = Set.Intersect( a, null ); Assert.AreEqual( 0, aNull.Count, "no elements intersected with null set" ); ISet bNull = Set.Intersect( null, b ); Assert.AreEqual( 0, bNull.Count, "no elements intersected with null set" ); ISet bothNull = Set.Intersect( null, null ); Assert.AreEqual( null, bothNull, "null sets intersect as null set" ); } [Test] public void IsEmpty() { Assert.IsFalse( _set.IsEmpty, "set should have initial values" ); Assert.IsTrue( CreateInstance().IsEmpty, "new set is empty" ); } [Test] public void Minus() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = Set.Minus( a, b ); Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'zero', and 'one'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); ISet aNull = Set.Minus( a, null ); Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "should have removed no elements" ); ISet bNull = Set.Minus( null, b ); Assert.AreEqual( null, bNull, "null set remained null" ); ISet bothNull = Set.Minus( null, null ); Assert.AreEqual( null, bothNull, "both sets are null" ); } [Test] public void Remove() { Assert.IsTrue( _set.Remove( one ), "should have removed 'one'" ); Assert.IsFalse( _set.Contains( one ), "one should have been removed" ); Assert.AreEqual( 2, _set.Count, "should be 2 items after one removed." ); Assert.IsFalse( _set.Remove( one ), "was already removed." ); } [Test] public void RemoveAll() { ArrayList all = new ArrayList(2); all.Add( one ); all.Add( "not in there" ); Assert.IsTrue( _set.RemoveAll( all ), "should have removed an element" ); Assert.AreEqual( 2, _set.Count, "should be down to 2 elements." ); Assert.IsFalse( _set.RemoveAll( all ), "all of the elements already removed so set not modified." ); } [Test] public void RetainAll() { ArrayList retain = new ArrayList(2); retain.Add( one ); retain.Add( "not in there" ); Assert.IsTrue( _set.RetainAll( retain ), "set was modified" ); Assert.AreEqual( 1, _set.Count, "only 1 element retained" ); Assert.IsFalse( _set.RetainAll( retain ), "set was not modified" ); } [Test] public void Union() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = Set.Union( a, b ); Assert.AreEqual( 5, ab.Count, "contains 5 elements - 'zero' through 'four'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" ); Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" ); Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); ISet aNull = Set.Union( a, null ); Assert.AreEqual( _aInitValues.Count, aNull.Count, "count not changed" ); Assert.IsTrue( aNull.ContainsAll( _aInitValues ), "still contains all initial values" ); ISet bNull = Set.Union( null, b ); Assert.AreEqual( _bInitValues.Count, bNull.Count, "count not changed" ); Assert.IsTrue( bNull.ContainsAll( _bInitValues ), "still contains all initial values" ); ISet bothNull = Set.Union( null, null ); Assert.AreEqual( null, bothNull, "two nulls intersect as null" ); } #endregion #region Iesi.Collection.ISet Operator Tests [Test] public void ExclusiveOrOperator() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = (Set)a ^ (Set)b; Assert.AreEqual( 3, ab.Count, "contains 3 elements - 'zero', 'one', and 'four'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); } [Test] public void IntersectOperator() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = (Set)a & (Set)b; Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'two', and 'three'" ); Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" ); Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" ); } [Test] public void MinusOperator() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = (Set)a - (Set)b; Assert.AreEqual( 2, ab.Count, "contains 2 elements - 'zero', and 'one'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); } [Test] public void UnionOperator() { ISet a = CreateInstance( _aInitValues ); ISet b = CreateInstance( _bInitValues ); ISet ab = (Set)a | (Set)b; Assert.AreEqual( 5, ab.Count, "contains 5 elements - 'zero' through 'four'" ); Assert.IsTrue( ab.Contains( "zero" ), "should contain 'zero'" ); Assert.IsTrue( ab.Contains( "one" ), "should contain 'one'" ); Assert.IsTrue( ab.Contains( "two" ), "should contain 'two'" ); Assert.IsTrue( ab.Contains( "three" ), "should contain 'three'" ); Assert.IsTrue( ab.Contains( "four" ), "should contain 'four'" ); Assert.IsTrue( a.ContainsAll( _aInitValues ), "should not have modified a" ); Assert.IsTrue( b.ContainsAll( _bInitValues ), "should not have modified b" ); } #endregion protected abstract ISet CreateInstance(); protected abstract ISet CreateInstance(ICollection init); protected abstract System.Type ExpectedType{ get; } } } --- NEW FILE: HybridSetFixture.cs --- using System; using System.Collections; using Iesi.Collections; using NUnit.Framework; namespace Iesi.Collections.Test { /// <summary> /// Summary description for HybridSetFixture. /// </summary> [TestFixture] public class HybridSetFixture : SetFixture { protected override ISet CreateInstance() { return new HybridSet(); } protected override ISet CreateInstance(ICollection init) { return new HybridSet( init ); } protected override Type ExpectedType { get { return typeof(HybridSet); } } } } --- NEW FILE: Iesi.Collections.Test.build --- (This appears to be a binary file; contents omitted.) --- NEW FILE: SortedSetFixture.cs --- using System; using System.Collections; using Iesi.Collections; using NUnit.Framework; namespace Iesi.Collections.Test { /// <summary> /// Summary description for SortedSetFixture. /// </summary> [TestFixture] public class SortedSetFixture : SetFixture { protected override ISet CreateInstance() { return new SortedSet(); } protected override ISet CreateInstance(ICollection init) { return new SortedSet( init ); } protected override Type ExpectedType { get { return typeof(SortedSet); } } [Test] public void OrderedEnumeration() { ArrayList expectedOrder = new ArrayList( 3 ); expectedOrder.Add( one ); expectedOrder.Add( two ); expectedOrder.Add( three ); expectedOrder.Sort( ); int index = 0; foreach( object obj in _set ) { Assert.AreEqual( obj, expectedOrder[index], index.ToString() + " did not have same value" ); index++; } } [Test] public void OrderedCaseInsensitiveEnumeration() { ArrayList expectedOrder = new ArrayList( 3 ); expectedOrder.Add( "ONE" ); expectedOrder.Add( "two" ); expectedOrder.Add( "tHree" ); SortedSet theSet = new SortedSet( expectedOrder, new CaseInsensitiveComparer() ); expectedOrder.Sort( new CaseInsensitiveComparer() ); int index = 0; foreach( object obj in theSet ) { Assert.AreEqual( obj, expectedOrder[index], index.ToString() + " did not have same value" ); index++; } } } } --- NEW FILE: AssemblyInfo.cs --- using System.Reflection; using System.Runtime.CompilerServices; //------------------------------------------------------------------------------ // <autogenerated> // This code was generated by a tool. // Runtime Version: 1.1.4322.985 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> //------------------------------------------------------------------------------ [assembly: AssemblyTitleAttribute("Iesi.Collections.Test for Microsoft .NET Framework 1.1")] [assembly: AssemblyDescriptionAttribute("The Unit Tests for Iesi.Collections.")] [assembly: AssemblyCompanyAttribute("nhibernate.sourceforge.net")] [assembly: AssemblyProductAttribute("Iesi.Collections.Test")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyVersionAttribute("1.0.0.1")] [assembly: AssemblyInformationalVersionAttribute("1.0")] [assembly: AssemblyFileVersionAttribute("1.0.0.1")] [assembly: AssemblyDelaySignAttribute(false)] --- NEW FILE: Iesi.Collections.Test-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{CD003655-9A41-4D66-A38B-E7A37D89386C}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "Iesi.Collections.Test" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "Iesi.Collections.Test" 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 = "..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "Iesi.Collections-1.1" Project = "{CEF80E5F-E838-4F27-9435-2E3630D5F9E0}" Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> <Reference Name = "nunit.framework" AssemblyName = "nunit.framework" HintPath = "..\..\lib\net\1.1\nunit.framework.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "HashedSetFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "HybridSetFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "Iesi.Collections.Test.build" BuildAction = "None" /> <File RelPath = "Iesi.Collections.Test.nunit" BuildAction = "None" /> <File RelPath = "ListSetFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SetFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "SortedSetFixture.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> |
From: Michael D. <mik...@us...> - 2004-12-08 15:14:30
|
Update of /cvsroot/nhibernate/nhibernate/src/Iesi.Collections.Test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6421/Iesi.Collections.Test Log Message: Directory /cvsroot/nhibernate/nhibernate/src/Iesi.Collections.Test added to the repository |
From: Kevin W. <kev...@us...> - 2004-12-08 08:02:51
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11790/src/BantamTech.SysCache Modified Files: SysCacheFixture.cs SysCacheProviderFixture.cs syscache.build Log Message: tweaked build scripts and test fixture classes, trying to get back to 89% code coverage results for SysCache Index: SysCacheFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache/SysCacheFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SysCacheFixture.cs 7 Dec 2004 19:59:16 -0000 1.1 --- SysCacheFixture.cs 8 Dec 2004 08:02:40 -0000 1.2 *************** *** 21,24 **** --- 21,26 ---- // $Id$ // + // CLOVER:OFF + // #endregion *************** *** 132,136 **** h.Add( "priority", 7 ); ICache cache = new SysCache( "nunit", h ); - Assert.IsNotNull( cache ); } --- 134,137 ---- *************** *** 143,147 **** h.Add( "relativeExpiration", 300 ); ICache cache = new SysCache( "nunit", h ); - Assert.IsNotNull( cache ); } --- 144,147 ---- *************** *** 153,157 **** h.Add( "staticExpiration", DateTime.Parse( "1/1/1980") ); ICache cache = new SysCache( "nunit", h ); - Assert.IsNotNull( cache ); } --- 153,156 ---- *************** *** 163,167 **** h.Add( "staticExpiration", "foobar" ); ICache cache = new SysCache( "nunit", h ); - Assert.IsNotNull( cache ); } --- 162,165 ---- *************** *** 173,177 **** h.Add( "relativeExpiration", "foobar" ); ICache cache = new SysCache( "nunit", h ); - Assert.IsNotNull( cache ); } --- 171,174 ---- Index: SysCacheProviderFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache/SysCacheProviderFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SysCacheProviderFixture.cs 7 Dec 2004 19:59:16 -0000 1.1 --- SysCacheProviderFixture.cs 8 Dec 2004 08:02:41 -0000 1.2 *************** *** 21,24 **** --- 21,26 ---- // $Id$ // + // CLOVER:OFF + // #endregion Index: syscache.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache/syscache.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** syscache.build 8 Dec 2004 01:15:55 -0000 1.2 --- syscache.build 8 Dec 2004 08:02:41 -0000 1.3 *************** *** 102,110 **** <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> --- 102,118 ---- <target name="test" depends="build" description="run unit tests"> ! <copy file="syscache.config" tofile="${build.dir}/bin/${nant.project.name}.Tests.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}/${nant.project.name}.Tests.dll.config" /> </nunit2> + <if propertytrue="nunit2report.installed"> + <mkdir dir="${build.dir}/testresults" /> + <nunit2report out="${build.dir}/testresults/syscache.html" todir="${build.dir}/testresults"> + <fileset> + <includes name="${build.dir}\bin\${nant.project.name}.Tests.dll-results.xml" /> + </fileset> + </nunit2report> + </if> </target> |
From: Kevin W. <kev...@us...> - 2004-12-08 08:02:50
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11790 Modified Files: NHibernateContribSolution.build readme.html Log Message: tweaked build scripts and test fixture classes, trying to get back to 89% code coverage results for SysCache Index: readme.html =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/readme.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** readme.html 12 Nov 2004 22:08:23 -0000 1.1 --- readme.html 8 Dec 2004 08:02:40 -0000 1.2 *************** *** 22,25 **** --- 22,28 ---- Nullables.Tests: A library of NUnit Tests for Nullables and Nullables.NHibernate. </li> + <li> + BantamTech.SysCache: A pluggable cache provider for NHibernate which leverages the ASP.NET Cache object. + </li> </ul> Index: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NHibernateContribSolution.build 8 Dec 2004 01:15:55 -0000 1.4 --- NHibernateContribSolution.build 8 Dec 2004 08:02:40 -0000 1.5 *************** *** 190,197 **** /> <clover-report> ! <current title="NHibernateContrib Clover Report" output="${build.dir}/clover" > <format type="html" orderBy="Alpha" /> </current> </clover-report> </target> --- 190,204 ---- /> <clover-report> ! <current title="NHibernateContrib" output="${build.dir}/clover" > <format type="html" orderBy="Alpha" /> </current> </clover-report> + <clover-check target="50%" haltOnFailure="false" property="covered" messageProperty="coverage.message"/> + <!--if test="${covered}"> + <echo message="Clover target met! :)"/> + </if> + <ifnot test="${covered}"> + <echo message="Clover target failed = ${coverage.message} :("/> + </ifnot--> </target> |
From: Michael D. <mik...@us...> - 2004-12-08 01:16:58
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv578 Added Files: .cvsignore Log Message: ignore vs.net junk --- NEW FILE: .cvsignore --- bin obj .#* *.user *.xsx |
From: Michael D. <mik...@us...> - 2004-12-08 01:16:07
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv394/src/BantamTech.SysCache Modified Files: syscache.build Log Message: Added clover target to syscache. Added syscache into sdkdoc target Renamed solution file to NHibernateContrib Index: syscache.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/BantamTech.SysCache/syscache.build,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** syscache.build 7 Dec 2004 19:59:16 -0000 1.1 --- syscache.build 8 Dec 2004 01:15:55 -0000 1.2 *************** *** 21,31 **** --> ! <!--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"> --- 21,40 ---- --> ! <if propertytrue="clover.enabled"> <loadtasks assembly="${clover.home}/CloverNAnt-0.84.dll" /> ! </if> <property name="keyFile" value="..\NHibernate.snk" /> <target name="build"> + <if propertytrue="clover.enabled"> + <clover-setup + initstring="..\..\${clover.db}" + builddir="..\..\${clover.src}\${nant.project.name}" + enabled="${clover.enabled}" + flushinterval="1000" + /> + </if> + <attrib file="AssemblyInfo.cs" readonly="false" /> <asminfo output="AssemblyInfo.cs" language="CSharp"> |
From: Michael D. <mik...@us...> - 2004-12-08 01:16:07
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv394 Modified Files: NHibernateContribSolution.build Log Message: Added clover target to syscache. Added syscache into sdkdoc target Renamed solution file to NHibernateContrib Index: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NHibernateContribSolution.build 7 Dec 2004 19:59:14 -0000 1.3 --- NHibernateContribSolution.build 8 Dec 2004 01:15:55 -0000 1.4 *************** *** 129,132 **** --- 129,133 ---- <fileset basedir="${lib.dir}"> <includes name="HashCodeProvider.*" /> + <includes name="Iesi.Collections.*" /> <includes name="log4net.*" /> <includes name="NHibernate.*" /> *************** *** 198,202 **** <ndoc> <assemblies basedir="${build.dir}/bin"> ! <includes name="Nullables.dll" /> <includes name="Nullables.NHibernate.dll" /> </assemblies> --- 199,204 ---- <ndoc> <assemblies basedir="${build.dir}/bin"> ! <includes name="BantamTech.SysCache.dll" /> ! <includes name="Nullables.dll" /> <includes name="Nullables.NHibernate.dll" /> </assemblies> |
From: Michael D. <mik...@us...> - 2004-12-08 01:16:06
|
Update of /cvsroot/nhibernate/NHibernateContrib/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv394/src Added Files: NHibernateContrib-1.1.sln Removed Files: Nullables-1.1.sln Log Message: Added clover target to syscache. Added syscache into sdkdoc target Renamed solution file to NHibernateContrib --- Nullables-1.1.sln DELETED --- --- NEW FILE: NHibernateContrib-1.1.sln --- Microsoft Visual Studio Solution File, Format Version 8.00 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nullables-1.1", "Nullables\Nullables-1.1.csproj", "{9DEFA2EA-4A52-445A-8DA4-6531BD5D76B5}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nullables.Tests-1.1", "Nullables.Tests\Nullables.Tests-1.1.csproj", "{2D3FBB15-830A-4A9E-82D7-A0712B7330E1}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nullables.NHibernate-1.1", "Nullables.NHibernate\Nullables.NHibernate-1.1.csproj", "{35F82297-CAB4-4D57-AAB9-CBDB1F6B8841}" ProjectSection(ProjectDependencies) = postProject 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 Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {9DEFA2EA-4A52-445A-8DA4-6531BD5D76B5}.Debug.ActiveCfg = Debug|.NET {9DEFA2EA-4A52-445A-8DA4-6531BD5D76B5}.Debug.Build.0 = Debug|.NET {9DEFA2EA-4A52-445A-8DA4-6531BD5D76B5}.Release.ActiveCfg = Release|.NET {9DEFA2EA-4A52-445A-8DA4-6531BD5D76B5}.Release.Build.0 = Release|.NET {2D3FBB15-830A-4A9E-82D7-A0712B7330E1}.Debug.ActiveCfg = Debug|.NET {2D3FBB15-830A-4A9E-82D7-A0712B7330E1}.Debug.Build.0 = Debug|.NET {2D3FBB15-830A-4A9E-82D7-A0712B7330E1}.Release.ActiveCfg = Release|.NET {2D3FBB15-830A-4A9E-82D7-A0712B7330E1}.Release.Build.0 = Release|.NET {35F82297-CAB4-4D57-AAB9-CBDB1F6B8841}.Debug.ActiveCfg = Debug|.NET {35F82297-CAB4-4D57-AAB9-CBDB1F6B8841}.Debug.Build.0 = Debug|.NET {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 EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal |
From: Donald L M. Jr. <lu...@us...> - 2004-12-07 21:33:00
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14167/src/Nullables Modified Files: NullableByte.cs NullableDateTime.cs NullableDecimal.cs NullableDouble.cs NullableGuid.cs NullableInt16.cs NullableInt32.cs NullableInt64.cs NullableSingle.cs Log Message: Added a simple implementation of IFormattable to the NullableTypes whos inner type supports it (it just wraps it). (Boolean doesn't implement IFormattable, the rest do) Index: NullableInt16.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt16.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt16.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableInt16.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt16Converter)), Serializable()] ! public struct NullableInt16 : INullableType { public static readonly NullableInt16 Default = new NullableInt16(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt16Converter)), Serializable()] ! public struct NullableInt16 : INullableType, IFormattable { public static readonly NullableInt16 Default = new NullableInt16(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableGuid.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableGuid.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableGuid.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableGuid.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 5,9 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableGuidConverter)), Serializable()] ! public struct NullableGuid : INullableType { public static readonly NullableGuid Default = new NullableGuid(); --- 5,9 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableGuidConverter)), Serializable()] ! public struct NullableGuid : INullableType, IFormattable { public static readonly NullableGuid Default = new NullableGuid(); *************** *** 123,126 **** --- 123,138 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableByte.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableByte.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableByte.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableByte.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableByteConverter)), Serializable()] ! public struct NullableByte : INullableType { public static readonly NullableByte Default = new NullableByte(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableByteConverter)), Serializable()] ! public struct NullableByte : INullableType, IFormattable { public static readonly NullableByte Default = new NullableByte(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableDecimal.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDecimal.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDecimal.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableDecimal.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDecimalConverter)), Serializable()] ! public struct NullableDecimal : INullableType { public static readonly NullableDecimal Default = new NullableDecimal(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDecimalConverter)), Serializable()] ! public struct NullableDecimal : INullableType, IFormattable { public static readonly NullableDecimal Default = new NullableDecimal(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableSingle.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableSingle.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableSingle.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableSingle.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableSingleConverter)), Serializable()] ! public struct NullableSingle : INullableType { public static readonly NullableSingle Default = new NullableSingle(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableSingleConverter)), Serializable()] ! public struct NullableSingle : INullableType, IFormattable { public static readonly NullableSingle Default = new NullableSingle(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableDouble.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDouble.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDouble.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableDouble.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDoubleConverter)), Serializable()] ! public struct NullableDouble : INullableType { public static readonly NullableDouble Default = new NullableDouble(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDoubleConverter)), Serializable()] ! public struct NullableDouble : INullableType, IFormattable { public static readonly NullableDouble Default = new NullableDouble(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableInt32.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt32.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt32.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableInt32.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 5,9 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt32Converter)), Serializable()] ! public struct NullableInt32 : INullableType { public static readonly NullableInt32 Default = new NullableInt32(); --- 5,9 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt32Converter)), Serializable()] ! public struct NullableInt32 : INullableType, IFormattable { public static readonly NullableInt32 Default = new NullableInt32(); *************** *** 155,158 **** --- 155,170 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableInt64.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableInt64.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableInt64.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableInt64.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt64Converter)), Serializable()] ! public struct NullableInt64 : INullableType { public static readonly NullableInt64 Default = new NullableInt64(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableInt64Converter)), Serializable()] ! public struct NullableInt64 : INullableType, IFormattable { public static readonly NullableInt64 Default = new NullableInt64(); *************** *** 154,157 **** --- 154,169 ---- return 0; //GetHashCode() doesn't garantee uniqueness, and neither do we. } + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } Index: NullableDateTime.cs =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/src/Nullables/NullableDateTime.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NullableDateTime.cs 12 Nov 2004 22:08:25 -0000 1.1 --- NullableDateTime.cs 7 Dec 2004 21:32:49 -0000 1.2 *************** *** 4,8 **** { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDateTimeConverter)), Serializable()] ! public struct NullableDateTime : INullableType { public static readonly NullableDateTime Default = new NullableDateTime(); --- 4,8 ---- { [System.ComponentModel.TypeConverter(typeof(Nullables.TypeConverters.NullableDateTimeConverter)), Serializable()] ! public struct NullableDateTime : INullableType, IFormattable { public static readonly NullableDateTime Default = new NullableDateTime(); *************** *** 124,127 **** --- 124,139 ---- //TODO: Operators for DateTime (?) + + #region IFormattable Members + + string System.IFormattable.ToString(string format, IFormatProvider formatProvider) + { + if (HasValue) + return Value.ToString(format, formatProvider); + else + return string.Empty; + } + + #endregion } } |
From: Donald L M. Jr. <lu...@us...> - 2004-12-07 21:28:46
|
Update of /cvsroot/nhibernate/NHibernateContrib/lib/net/1.1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13218/lib/net/1.1 Modified Files: NHibernate.dll Log Message: updated files in the lib folder Index: NHibernate.dll =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/lib/net/1.1/NHibernate.dll,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsqjxryc and /tmp/cvs8AzcZO differ |
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:54
|
Update of /cvsroot/nhibernate/NHibernateContrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040 Modified Files: NHibernateContribSolution.build 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: NHibernateContribSolution.build =================================================================== RCS file: /cvsroot/nhibernate/NHibernateContrib/NHibernateContribSolution.build,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NHibernateContribSolution.build 6 Dec 2004 02:07:25 -0000 1.2 --- NHibernateContribSolution.build 7 Dec 2004 19:59:14 -0000 1.3 *************** *** 138,141 **** --- 138,142 ---- <nant target="build" buildfile="src/Nullables.NHibernate/Nullables.NHibernate.build" /> <nant target="build" buildfile="src/Nullables.Tests/Nullables.Tests.build" /> + <nant target="build" buildfile="src/BantamTech.SysCache/syscache.build" /> </target> *************** *** 174,177 **** --- 175,180 ---- /> + <nant target="test" buildfile="src/BantamTech.SysCache/syscache.build" /> + <!-- if this was a clover enabled build then generate the clover reports for it --> <call target="coverage-report" if="${clover.enabled}" /> |
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:28
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.Tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040/src/Nullables.Tests 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.Tests/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:59 -0000 1.2 --- AssemblyInfo.cs 7 Dec 2004 19:59:17 -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 |
From: Kevin W. <kev...@us...> - 2004-12-07 19:59:28
|
Update of /cvsroot/nhibernate/NHibernateContrib/src/Nullables.NHibernate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23040/src/Nullables.NHibernate 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.NHibernate/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:59 -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 ---- |