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

Raja R Harinath rharinath at novell.com
Tue Jun 21 02:03:00 EDT 2005


Hi,

Ben Maurer <bmaurer at ximian.com> writes:

> 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).

According to msdn2.microsoft.com, SyncRoot returns the current object by
default (whatever that means :-)

- Hari



More information about the Mono-devel-list mailing list