Fixes the enumerator for SortedList.
[mono.git] / mcs / class / corlib / System.Collections / ChangeLog
1 2003-06-13  Herve Poussineau  <hpoussineau@fr.st>
2
3         * SortedList.cs: Can enumerate on DictionaryEntries, not only on
4         keys on values. Enumerate by default on DictionaryEntries.
5
6 2003-06-12  Duncan Mak  <duncan@ximian.com>
7
8         * Hashtable.cs (constructor):
9         if loadFactor equals Single.NaN, then throw an
10         ArgumentOutOfRangeException.
11
12         if we set capacity to be too big (ie. capacity / loadFactor is
13         greater than Int32.MaxValue), then we throw an ArgumentException.
14
15 2003-06-11  Duncan Mak  <duncan@ximian.com>
16
17         * SortedList.cs: Oi! What a mess.
18
19         If the list was constructed using the null-param constructor, and
20         it tries to set it to a size lower than the default, let it do so.
21
22         If the list was constructed with a specific size, and it tries to
23         set it to a size lower than the specified size, set it to the
24         default size.
25
26         (IndexOfValue): Clean up the code somewhat, make it allow for
27         values to be null.
28
29 2003-06-08  Ben Maurer <bmaurer@users.sourceforge.net>
30         * ArrayList.cs, Hashtable.cs, SortedList.cs: Enumerator fixes, error
31         checking
32
33 2003-06-07  Ben Maurer <bmaurer@users.sourceforge.net>
34         * Stack.cs: Contains (null) works correctly. We never have the
35         array sized less than 16, so that the doubling logic works no
36         matter what. The enumerator is IClonable, like in ms. The
37         Enumerator correctly throws an exception if Current is called
38         before the enumerator is started. We now pass all the Rotor tests
39         for this file!
40
41 2003-06-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
42
43         * Stack.cs: fixed Clone ().
44
45 2003-06-04  Ben Maurer <bmaurer@users.sourceforge.net>
46         * DictionaryEntry.cs: Throw exception if key == null. Fixes Rotor
47         failures
48
49 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
50
51         * ArrayList.cs: nullify the array in Clear ().
52         * Queue.cs: nullify the array in Dequeue ().
53         * Stack.cs: nullify the array in Pop ().
54
55 2003-06-02  Ben Maurer <bmaurer@users.sourceforge.net>
56         * Queue.cs: Added argument checking in constructors according to
57         specs. Also changed default size to 32 as required by the specs.
58
59 2003-05-31  Ben Maurer <bmaurer@users.sourceforge.net>
60         * BitArray.cs: Rewrote, as it was failing most of the Rotor
61         tests. It now passes them 100%. Also fixes bug #43667.
62
63 2003-05-03 Ben Maurer <bmaurer@users.sourceforge.net>
64 * ArrayList.cs
65         Made ArrayList.GetRange () make a wrapper around the array list, like Microsoft does. Fixes bug #39724.
66
67 2003-05-03 Ben Maurer <bmaurer@users.sourceforge.net>
68 * ArrayList.cs
69         Added methods to support IList wrappers
70
71 2003-04-22  Gonzalo Paniagua Javier <gonzalo@ximian.com>
72
73         * ArrayList.cs: patch from bernard@ugsolutions.com (Bernie Solomon)
74         that fixes bug #41684.
75
76 2003-04-15 Eduardo Garcia Cebollero <kiwnix@yahoo.es>
77
78         * CaseInsensitiveComparerTest.cs: Fixed Compare Method (now works
79         like MS.NET) and implemented the
80         CaseInsensitiveComparerTest(culture) constructor.
81
82 2003-03-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
83
84         * Queue.cs: fixed bug #39046.
85
86 2003-02-15  Pedro Martínez Juliá  <yoros@wanadoo.es>
87
88         * Hashtable.cs: Make hashtable serializable (at least with binary
89         formatter). This process was started by the Hashtable maintainer.
90
91 2003-02-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
92
93         * ArrayList.cs: fixed setSize (!).
94
95 2003-01-31  Zoltan Varga  <vargaz@freemail.hu>
96
97         * ArrayList.cs (RemoveAt): duplicated the the code from RemoveRange
98         here, since RemoveAt raises a different exception than RemoveRange
99         when the index is out-of-range. Fixes the ArrayList unit tests.
100
101         * ArrayList.cs (RemoveRange): fixed indentation.
102
103 2003-01-12  Varga Zoltan <vargaz@freemail.hu>
104
105         * ArrayList.cs (RemoveRange): Patch for allowing zero-size
106         removal at the end of a list. It also cleans up the argument
107         checking code so the raised exceptions have the same message as
108         under MS.NET.
109
110 2003-01-10  Duncan Mak  <duncan@ximian.com>
111
112         * ArrayList.cs (Insert): Patch from Zoltan
113         (Zoltan.2.Varga@nokia.com).
114
115 2002-10-27  Gonzalo Paniagua Javier <gonzalo@ximian.com>
116
117         * Hashtable.cs: add the key to the error message when
118         'key duplication'.
119
120 2002-10-15  Vladimir Vukicevic  <vladimir@pobox.com>
121
122         * Queue.cs: update new capacity in grow(), preventing queue from
123         constantly looping over old elements in Dequeue(). Also use
124         capacity instead of contents.Length in Enqueue().
125
126 2002-09-24  Nick Drochak  <ndrochak@gol.com>
127
128         * ArrayList.cs: Make enumerator throw exception if the ArrayList is
129         mutated (Insert, Delete, etc.). Also, fix bug in InsertRange() when
130         this was passed as parameter.
131
132 2002-08-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
133
134         * ArrayList.cs: fixed bug #29658.
135
136 2002-08-24  Gonzalo Paniagua Javier <gonzalo@ximian.com>
137
138         * ArrayList.cs:
139         * BitArray.cs:
140         * CaseInsensitiveComparer.cs:
141         * CaseInsensitiveHashCodeProvider.cs:
142         * IEnumerable.cs:
143         * Queue.cs: misc. fixes based on class status page.
144
145 2002-07-22  Tim Coleman  <tim@timcoleman.com>
146         * CaseInsensitiveHashCodeProvider.cs: Added missing constructor
147                 which was breaking System.Web build on linux
148
149 2002-07-05  Sergey Chaban <serge@wildwestsoftware.com>
150
151         * SortedList.cs: Implemented thread-safe wrapper. Changed some
152         args to camelCase.
153
154 2002-07-02  Nick Drochak  <ndrochak@gol.com>
155
156         * SortedList.cs: Constructors should use the capacity given regardless 
157         how small. After a Clear() the Capacit should be 16. Since a Dictionary
158         might be used in the constructor, make sure we trap exceptions thrown
159         by the Comparer, like in Add().
160
161 2002-06-30  Nick Drochak  <ndrochak@gol.com>
162
163         * SortedList.cs: Many fixed. A lot of checking for null and throwing
164         exceptions.  A few logic bugs fixed as well
165
166 2002-06-25   Nick Drochak  <ndrochak@gol.com>
167
168         * Queue.cs (CopyTo): Fix logic for copying the circular array.
169         (Enqueue): Use actual length of array to determine when to grow
170         (QueueEnumerator) Fixed Current to use array length, not capacity, and
171         fixed off-by-one errror in MoveNext().
172
173 Tue Jun 4 13:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
174
175         * ArrayList.cs: fixed RemoveAt() implementation.
176
177 2002-05-27  Nick Drochak  <ndrochak@gol.com>
178
179         * ArrayList.cs (LastIndexOf): Return -1 if searching for null, also
180         fix check of parameters sent to make sure we don't search beyond the
181         beginning of the list.
182         (ListWrapper): Throw exception if called with null.
183         We now pass all unit tests.
184
185 2002-05-23  Duncan Mak  <duncan@ximian.com>
186
187         * ArrayList.cs (Wrapper): Preliminary implementation of
188         ArrayList.Wrapper (IList).
189
190 2002-05-22  Martin Baulig  <martin@gnome.org>
191
192         * ArrayList.cs: Made count, capacity and dataArray the first three
193         fields in the class.  They're read by the reflection library.
194
195 2002-05-21  Lawrence Pit  <loz@cable.a2000.nl>
196
197         * ArrayList.cs: Fixed bug where a capacity of 0 could be reached, 
198         thereby causing problems when trying to add elements.
199
200 2002-05-06  Duncan Mak  <duncan@ximian.com>
201
202         * Queue.cs (TrimToSize): Implemented.
203         
204 2002-05-05  Nick Drochak  <ndrochak@gol.com>
205
206         * ArrayList.cs: Throw RankException when constructing from a 
207         multi-dimensional array. Confirmed behavior from MS.NET
208
209 Thu May 2 15:18:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
210
211         * ArrayList.cs: make mcs compile again: it's allowed to
212         call arraylist.CopyTo(array, 0) when the length of the array
213         is also 0.
214
215 Wed May 1 17:05:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
216
217         * SortedList.cs: fix RemoveAt () to use the correct length in
218         Array.Copy.
219
220 2002-05-01  Nick Drochak  <ndrochak@gol.com>
221
222         * ArrayList.cs (Add & AddRange) : Throw exceptions where needed.
223
224 2002/05/01  Nick Drochak <ndrochak@gol.com>
225
226         * ArrayList.cs (CopyTo) : Check parameters and throw exceptions
227         where needed.
228
229 2002/04/30  Nick Drochak <ndrochak@gol.com>
230
231         * ArrayList.cs (Clear) : Throw exception if ReadOnly or FixedSize.
232                 (InsertRange) : Implement.
233                 (SetRange) : Implement.
234
235 2002-04-30  Nick Drochak  <ndrochak@gol.com>
236
237         * ArrayList.cs (TrimToSize) : Implement.
238
239 2002-04-28  Duncan Mak  <duncan@ximian.com>
240
241         * ArrayList.cs (InsertRange): 
242         (SetRange):
243         (Remove):
244         (TrimToSize): Throw exceptions where needed.
245
246 2002-04-29  Nick Drochak  <ndrochak@gol.com>
247
248         * Hashtable.cs (CopyTo): Throw exceptions where needed.
249
250 2002-04-28  Duncan Mak  <duncan@ximian.com>
251
252         * ArrayList.cs (ReadOnly):
253         (IList.ReadOnly): Implemented.
254
255         (Synchronized):
256         (IList.Synchronized): Implemented.
257
258         (ixedSize):
259         (IList.FixedSize): Implemented.
260
261 2002-03-24  Duncan Mak  <duncan@ximian.com>
262
263         * SortedList.cs (Synchronized): Stubbed out a missing method
264         pointed out by Jakk Simm's test suite.
265
266 2002-03-14  Nick Drochak  <ndrochak@gol.com>
267
268         * ArrayList.cs (FixedSize(ArrayList)): should return an ArrayList. The
269         other FixedSize() methods returns an IList.
270
271 2002-03-13  Duncan Mak  <duncan@ximian.com>
272
273         * ArrayList.cs (FixedSize): Changed the return type to IList if
274         the argument is an IList.
275         (Synchronized): Ditto here.
276
277 2002-03-08  Sergey Chaban <serge@wildwestsoftware.com>
278
279         * Hashtable.cs: Fixed ToPrime () bug. Removed ALLOC_GRAIN.
280         Removed unused code from static constructor.
281         GetObjectData () - Version is the same as modificationCount.
282
283 2002-02-20  Nick Drochak  <ndrochak@gol.com>
284
285         * ArrayList.cs: Add MonoTODO's where necessary. Fix bugs discovered
286         by Bucky's tests. Implement a couple of things that were left undone.
287
288 Mon Feb 11 19:49:25 CET 2002 Paolo Molaro <lupus@ximian.com>
289
290         * ArrayList.cs: Dick's fix to contructor.
291
292 2002-02-07  Duncan Mak  <duncan@ximian.com>
293
294         * Hashtable.cs: Implemented parts of the ISerializable
295         interface. GetObjectData () is good, but serialization constructor
296         needs some more love.
297
298 Sat Jan 5 15:56:54 CET 2002 Paolo Molaro <lupus@ximian.com>
299
300         * Hashtable.cs: the IDictionaryEnumerator returns DictionaryEntries.
301
302 2002-01-04  Ravi Pratap  <ravi@ximian.com>
303
304         * Correct name to MonoTODO everywhere.
305
306 2002-01-04  Ravi Pratap  <ravi@ximian.com>
307
308         * ArrayList.cs : Setting an index does not implicitly
309         extend the arraylist : remove FIXME.
310
311         Decorate incomplete elements with the TODO attribute.
312
313         * BitArray.cs : Insert TODO attributes where appropriate.
314
315         * CaseInsensitiveHashcodeProvider.cs: Ditto.
316
317         * Hashtable.cs, SortedList.cs : Ditto.
318         
319 Thu Dec 13 20:17:08 CET 2001 Paolo Molaro <lupus@ximian.com>
320
321         * ArrayList.cs: implemented AddRange(), CopyTo().
322
323 2001-11-19  Miguel de Icaza  <miguel@ximian.com>
324
325         * DictionaryBase.cs: Implemented.
326
327 Wed Nov 14 16:45:49 CET 2001 Paolo Molaro <lupus@ximian.com>
328
329         * ArrayList.cs: implement ArrayListEnumerator.
330         * Hashtable.cs: hardcode the prime number table.
331
332 2001-11-06 Nick Drochak <ndrochak@gol.com>
333         * Queue.cs: Fixes from Ricardardo.  QueueTest also updated.
334
335 2001-11-04 Nick Drochak <ndrochak@gol.com>
336         * Queue.cs: Fixed small syntax errors that were preventing the compile.
337         I changed the build file to include Queue.cs as well.
338
339 2001-11-04 Nick Drochak <ndrochak@gol.com>
340         * ArrayList.cs: Fixed "off by one" error when shifting left the array when
341         items are removed.
342
343         * CollectionBase.cs: Added OnValidate(), OnRemove() and OnRemoveComplete()
344         hook methods to the RemoveAt() method.
345
346 2001-11-04 Nick Drochak <ndrochak@gol.com>
347         * ArrayList.cs: Added private enumerator class and make GetEnumerator()
348         methods return an instance of it.
349
350 Tue Sep 25 18:52:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
351
352         * ArrayList.cs: fix Insert () to check capacity, not count.
353
354 Tue Sep 25 16:54:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
355
356         * DictionaryEntry.cs: added.
357
358 2001-08-10  Dietmar Maurer  <dietmar@ximian.com>
359
360         * common.src: removed duplicate entries
361
362 2001-08-08 Nick Drochak <ndrochak@gol.com>
363
364          * ReadOnlyCollectionBase.cs: Initialized private member.
365          * CollectionBase.cs: Initialized private member.
366          * common.src : Added ReadOnlyCollectionBase.cs and CollectionBase.cs
367          * /mcs/class/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt
368          * /mcs/makefile: Used $(SYSTEMROOT) instead of hard coded //c/winnt
369
370 2001-08-08 Nick Drochak <nick@jobdragon.com>
371
372          * CollectionBase.cs: Add
373          * ReadOnlyCollectionBase.cs: Add
374          * CollectionBaseTest.cs: Add
375          * ReadOnlyCollectionBaseTest.cs: Add
376
377 2001-07-31 Garrett Rooney <rooneg@electricjellyfish.net>
378
379         * StackTest.cs: Add Test case for System.Collections.Stack.  
380         Contributed by Chris Hynes <chrish@assistedsolutions.com>
381
382 2001-07-30 Garrett Rooney <rooneg@electricjellyfish.net>
383
384         * Stack.cs: Clone() doesn't need to check if it's synchronized, since 
385         we override it in SyncStack anyway...  
386
387         * Stack.cs: Pop() now shrinks the array if we drop below 1/4 full, to 
388         avoid using massive amounts of memory that are not necessary.  We only 
389         drop to half the current size, which I hope will avoid the 'ping-pong' 
390         effect.
391
392         * Stack.cs: SyncStack.IsReadOnly should return stack.IsReadOnly 
393         instead of just returning false, since we may have a ReadOnly wrapper 
394         in the future (although i can't imagine why).  Thanks to David 
395         Menestrina <dmenest@yahoo.com> for pointing this out.
396
397 2001-07-23  Sergey Chaban <serge@wildwestsoftware.com>
398
399         *  Hashtable.cs: Fixed bug in Clear(), the Count wasn't zeroed.
400            From now, Clear() increases modification count.
401            Fixed HCP bug in GetHash(object) - hcp.GetHashCode() was used
402            instead of hcp.GetHashCode(key). This was resulted in the
403            insanely long lookup times when HashCodeProvider was used to
404            construct Hashtable. Added thread-safe wrapper.
405
406 2001-07-16  David Menestrina <dmenest@yahoo.com>
407
408          * BitArray.cs: Add
409          * BitArrayTest.cs: Add
410
411 2001-07-18  Miguel de Icaza  <miguel@ximian.com>
412
413         * IDictionary.cs (Collections): IDictionary implements ICollection
414         as well.  Thanks Sergey!
415
416 2001-07-18  Garrett Rooney  <rooneg@electricjellyfish.net>
417
418         * Stack.cs Removed unnecessary locking from many methods of 
419         SyncStack, removed SyncEnumerator because it was unnecessary, 
420         added a modCount member to Stack and Stack.Enumerator, to 
421         ensure that the Stack has not been modified out form under the 
422         Enumerator, and changed the Enumerator to use a reference to the 
423         stack rather than copying over the contents array.
424
425 2001-07-17  David Menestrina  <dmenest@yahoo.com>
426
427         * Added implementation of BitArray.
428
429 2001-07-17  Miguel de Icaza  <miguel@ximian.com>
430
431         * Hashtable.cs: Removed call to d.Count in the Hashtable
432         constructor that takes an IDictionary as IDictionary does not
433         provide a Count field.
434
435 2001-07-15  Sean MacIsaac  <macisaac@ximian.com>
436
437         * IDictionary.cs: Clear was clear.
438
439 2001-07-13  Miguel de Icaza  <miguel@ximian.com>
440
441         * All files: Renamespace things to System.
442
443 2001-07-05  Vladimir Vukicevic  <vladimir@ximian.com>
444
445         * ArrayList.cs: initial checkin and implementation
446
447         * ICollection.cs, IComprarer.cs, IDictionary.cs,
448           IDictionaryEnumerator.cs, IEnumerable.cs, IHashCodeProvider.cs,
449           IList.cs: initial checkin
450