[Mono-devel-list] [PATCH] System.Collections.ObjectModel implementations

David Waite dwaite at gmail.com
Mon Jun 20 16:35:26 EDT 2005


On 6/20/05, Ben Maurer <bmaurer at ximian.com> wrote:
> On Mon, 2005-06-20 at 00:44 -0600, David Waite wrote:
> > Included in this patch are implementations of Collection<T> and
> > ReadOnlyCollection<T>. KeyedCollection I left alone.
> >
> > 2005-06-19  David Waite  <mass at akuma.org>
> >
> >         * Collection.cs ReadonlyCollection.cs: Implement all methods
> > _______________________________________________
> 
> 
> 
> > -                       throw new NotImplementedException ();
> > +                       if (list == null)
> > +                               throw new ArgumentNullException("list");
> > +                       this.list = list;
> > +                       ICollection l = list as ICollection;
> > +                       syncRoot = (l != null) ? l.SyncRoot : new object();
> >                 }
> 
> Is the syncroot behavior exactly what msft does? Do you have tests?
> (ditto for readonly version).

I'll refactor my behavioral exploration code against b2 into a test
before committing. I have no other tests currently. I'm starting to
wonder if creating a set of generic test fixtures for list may be
appropriate, since there is a lot of reuse potential across the
different 'list' implementations, and may be a case later to test
against different contained types.

- David Waite



More information about the Mono-devel-list mailing list