Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8599/NHibernate/Collection
Modified Files:
PersistentCollection.cs Set.cs
Log Message:
NH-233: Implement AddAll on Set.
Index: PersistentCollection.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/PersistentCollection.cs,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** PersistentCollection.cs 26 Mar 2005 15:33:32 -0000 1.24
--- PersistentCollection.cs 29 Mar 2005 05:33:15 -0000 1.25
***************
*** 167,182 ****
}
- // TODO: h2.0.3 synhc - I don't see AddAll in the H code...
- // NB This is needed by Set/SortedSet to fulfil ISet contract
- /// <summary>
- ///
- /// </summary>
- /// <param name="coll"></param>
- /// <returns></returns>
- public virtual bool AddAll( ICollection coll )
- {
- throw new AssertionFailure( "Collection does not support delayed initialization" );
- }
-
/// <summary>
/// Gets or Sets an <see cref="ArrayList"/> of objects that have been placed in the Queue
--- 167,170 ----
Index: Set.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/Set.cs,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Set.cs 14 Mar 2005 18:51:49 -0000 1.27
--- Set.cs 29 Mar 2005 05:33:15 -0000 1.28
***************
*** 220,223 ****
--- 220,241 ----
}
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="coll"></param>
+ /// <returns></returns>
+ public bool AddAll( ICollection coll )
+ {
+ if( coll.Count > 0 )
+ {
+ Write();
+ return internalSet.AddAll( coll );
+ }
+ else
+ {
+ return false;
+ }
+ }
+
/// <summary></summary>
public void Clear()
|