Commit Graph
64 Commits
Author SHA1 Message Date
Juraj Skripsky cc663a9ef8 2008-01-07 Juraj Skripsky <[email protected]>
* NameObjectCollectionBase.cs: Add argument checking in CopyTo,
	replace use of enumerator by for-loop. Check IsReadOnly in BaseSet()
	only on the 2.0 profile.

2008-01-07  Gert Driesen  <[email protected]>

	* NameObjectCollectionBaseTest.cs: Add tests for argument checking in
	GetObjectData, Add, Clear, Remove, RemoveAt, Set and CopyTo. 


svn path=/trunk/mcs/; revision=92428
2008-01-08 06:50:05 +00:00
Atsushi Eno 851d970852 revert the regressing change.
http://mono.ximian.com/monobuild/builds/HEAD/sles-9-i586/mono/90438/logs/test-profiles.log


svn path=/trunk/mcs/; revision=90446
2007-11-29 17:26:38 +00:00
Konstantin Triger 7d2aa64ce0 fix default case-insensitive comparer for 2.0 profile
svn path=/trunk/mcs/; revision=90415
2007-11-29 08:03:45 +00:00
Ilya Kharmatsky 38978683b8 Proper exceptions throwing / handling under NET_2_0 target.
svn path=/trunk/mcs/; revision=76446
2007-04-29 09:08:22 +00:00
Marek Safar 372eb0344a 2007-04-15 Marek Safar <[email protected]>
* ListDictionary: Removed not used variable.

svn path=/trunk/mcs/; revision=75733
2007-04-15 18:27:58 +00:00
Alan McGovern 0c219660e6 Should've used "or" not "and" in the inequality test.
svn path=/trunk/mcs/; revision=75017
2007-03-27 14:05:34 +00:00
Konstantin Triger f2e320226b use IEqualityComparer for key comparison
svn path=/trunk/mcs/; revision=71254
2007-01-18 12:41:05 +00:00
Andrew Skiba 8eef8621a8 remove unneeded out parameter
svn path=/trunk/mcs/; revision=66187
2006-10-03 13:41:00 +00:00
Gert Driesen 9027231fe9 * CollectionsUtil.cs: Set eol-style to CRLF.
* StringDictionary.cs: Fixed line endings. Set eol-style to CRLF.
* StringEnumerator.cs: Set eol-style to CRLF.
* OrderDictionary.cs: Set eol-style to CRLF.

svn path=/trunk/mcs/; revision=66172
2006-10-02 20:22:33 +00:00
Gert Driesen c5825c88a1 * OrderedDictionary.cs: IsReadOnly, indexers, Keys and Values should
not be virtual.
* SortedList.cs: Count property, indexer and Clear method should not
be virtual. Removed unnecessary explicit interface implementation of
Add (TKey, TValue) and Remove (TKey, TValue).
* Queue.cs: Marked Enumerator as Serializable.
* Stack.cs: Marked Stack <T> and Enumerator as serializable.

svn path=/trunk/mcs/; revision=66168
2006-10-02 18:35:51 +00:00
Atsushi Eno bd1da5281e 2006-04-04 Atsushi Enomoto <[email protected]>
* BitVector32.cs : oops those operators are for BitVector32.Section,
	  not BitVector32 itself.


svn path=/trunk/mcs/; revision=58997
2006-04-04 01:31:40 +00:00
Atsushi Eno 3ebe3c0d50 2006-04-04 Atsushi Enomoto <[email protected]>
* BitVector32.cs : added operator== and != in 2.0.


svn path=/trunk/mcs/; revision=58990
2006-04-04 00:38:02 +00:00
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +00:00
Sebastien Pouliot 67961eee85 2005-11-30 Sebastien Pouliot <[email protected]>
* OrderedDictionary.cs: OnDeserialization is protected virtual (not 
	private).


svn path=/trunk/mcs/; revision=53690
2005-11-30 15:39:24 +00:00
Sebastien Pouliot 02406ae84c 2005-11-30 Sebastien Pouliot <[email protected]>
* BitVector32.cs: Fixed 2.0 API changes and this[int] setter under 2.0
	* HybridDictionary.cs: Fixed Contains different behaviour under 2.0.
	* IOrderedDictionary.cs: Added missing GetEnumarator to the interface.
	* NameObjectCollectionBase.cs: Fixed 2.0 API changes and 
	serialization.
	* NameValueCollection.cs: Fixed 2.0 API changes.
	* OrderedDictionary.cs: Fixed API changes, serialization and this[int]
	setter.
	* StringDictionary.cs: Added missing null checks.


svn path=/trunk/mcs/; revision=53678
2005-11-30 13:55:28 +00:00
Raja R Harinath dc7cf4d19b * HybridDictionary.cs (is_list): Remove.
(inner): Remove 'set' accessor.
(HybridDictionary, Switch): Initialize 'list' and 'hashtable' directly.

Remove one level of abstraction, where it's unnecessary.

svn path=/trunk/mcs/; revision=52238
2005-10-26 11:30:03 +00:00
Svetlana Zholkovsky dd6a565c7d Fix serialization compatibility with .NET for NameObjectCollectionBase.cs, ListDictionary.cs, HybridDictionary.cs
svn path=/trunk/mcs/; revision=52237
2005-10-26 10:47:11 +00:00
Raja R Harinath 141eee1959 * NameValueCollection.cs (Add): Add a key from the other
collection even if its associated value list is empty.
Fix regression introduced by last change.

svn path=/trunk/mcs/; revision=49257
2005-09-01 11:19:14 +00:00
Jackson Harper c71481a2f6 * NameValueCollection.cs: Don't crash when we have empty
collections.


svn path=/trunk/mcs/; revision=49149
2005-08-30 19:48:30 +00:00
Jb Evain 00e41001fb 2005-08-19 Jb Evain <[email protected]>
* NameObjectCollectionBase (GetEnumerator):
		Use the virtual modifier only in 2.0 profile.

svn path=/trunk/mcs/; revision=48579
2005-08-19 21:59:23 +00:00
Jb Evain 53997b7dfb 2005-08-19 Jb Evain <[email protected]>
* NameObjectCollectionBase (GetEnumerator):
		Remove the virtual modifier.

svn path=/trunk/mcs/; revision=48567
2005-08-19 18:29:07 +00:00
Raja R Harinath 117bb98559 * ListDictionary.cs: Rewrite to reduce key comparison overhead.
Unify all list traversals into FindEntry.
(AreEqual): Remove.
(FindEntry): Split into two duplicate loops, one when comparer ==
null, the other when it isn't.  Add new out parameter that points
to the entry preceding the result.
(Add, AddImpl, this []): Update.
(Remove): Use FindEntry for traversal.
(CopyTo): Add more tests.
(ListEntryEnumerator): Simplify.
(ListEntryCollection, ListEntryCollectionEnumerator): Likewise.

(I started out to delete AreEqual, but it ended up into an drive-by cleanup)

svn path=/trunk/mcs/; revision=47958
2005-08-03 13:48:31 +00:00
Raja R Harinath cb729da994 (Now that the compiler has started using HybridDictionary, ...)
* HybridDictionary.cs: Rewrite to avoid a test on each operation.
(list, hashtable): Remove.
(inner): New IDictionary field that can hold either a list
dictionary or a hashtable.
(is_list): New.  Notes whether 'inner' holds a list dictionary or not.
(Clear): Don't change a hashtable to a list dictionary.

svn path=/trunk/mcs/; revision=47950
2005-08-03 10:53:55 +00:00
Lluis Sanchez 3096ca5b61 2005-07-25 Lluis Sanchez Gual <[email protected]>
* NameObjectCollectionBase.cs: Don't throw an exception in
	OnDeserialization if infoCopy has not been set, which means that
	the serialization constructor has not been called, because
	a subclass may completely override that constructor.
	This fixes bug #75607.


svn path=/trunk/mcs/; revision=47636
2005-07-25 10:40:35 +00:00
Ben Maurer a68aa2eda4 remove executable bit from changelogs
svn path=/trunk/mcs/; revision=46563
2005-06-27 15:53:16 +00:00
Gonzalo Paniagua Javier eb981f03fa 2005-05-09 Gonzalo Paniagua Javier <[email protected]>
* ProcessStringDictionary.cs: PlatformID for 2.0.


svn path=/trunk/mcs/; revision=44279
2005-05-09 15:10:28 +00:00
Gonzalo Paniagua Javier 746dc7695d 2005-05-08 Gonzalo Paniagua Javier <[email protected]>
* NameObjectCollectionBase.cs: after 1.0, this uses DefaultInvariant for
	the hash code provider and comparer, as Ben said.


svn path=/trunk/mcs/; revision=44225
2005-05-08 23:07:07 +00:00
Lluis Sanchez e0cad0f926 2005-05-05 Lluis Sanchez Gual <[email protected]>
* OrderedDictionary.cs: Don't crash when removing an item
	that is not in the dictionary.


svn path=/trunk/mcs/; revision=44098
2005-05-05 21:09:19 +00:00
Gonzalo Paniagua Javier ca9a2ffbef 2005-05-05 Gonzalo Paniagua Javier <[email protected]>
* ProcessStringDictionary.cs: on non-windows system, don't make the
	hashtable case-insensitive. Fixes bug #74796.


svn path=/trunk/mcs/; revision=44064
2005-05-05 06:37:24 +00:00
Lluis Sanchez 946a442de4 2005-03-23 Lluis Sanchez Gual <[email protected]>
* OrderedDictionary.cs: Fix bug in item setter.


svn path=/trunk/mcs/; revision=42157
2005-03-23 17:23:27 +00:00
Lluis Sanchez 5572777698 2005-03-04 Lluis Sanchez Gual <[email protected]>
* OrderedDictionary.cs: Implemented.


svn path=/trunk/mcs/; revision=41452
2005-03-04 18:03:56 +00:00
Duncan Mak 3fff2f093c * System.dll.sources: Added new classes in System.Configuration.
* NameObjectCollectionBase.cs: Fix line endings. It's mostly in
DOS endings, so I left it at that.
(GetEnumerator): Made virtual.

* ConfigurationElement.cs (InitializeDefault): Made virtual.

* AppSettingsSection.cs:
* Configuration.cs:
* ConfigurationLocation.cs:
* ConfigurationLocationCollection.cs:
* ConfigurationSection.cs:
* ConfigurationSectionCollection.cs:
* ConfigurationSectionGroup.cs:
* ConfigurationSectionGroupCollection.cs:
* ConnectionStringsSection.cs: Added stubs and bits of implementation.

Other than ConfigurationElementCollection and
ConnectionStringsSectionCollection, we now have the basic skeleton for
implementing the configuration system in the System.Configuration
namespace.

svn path=/trunk/mcs/; revision=32398
2004-08-16 20:24:43 +00:00
Sebastien Pouliot 9abca3e9dd 2004-06-14 Sebastien Pouliot <[email protected]>
* NameObjectCollectionBase.cs: Now use IComparer to compare keys. This
	completes a TODO and fix Remove in NameValueCollection.

svn path=/trunk/mcs/; revision=29550
2004-06-14 20:43:18 +00:00
Sebastien Pouliot 95d1497d5f 2004-06-14 Sebastien Pouliot <[email protected]>
* HybridDictionary.cs: Fixed Contains for null argument (again). Return
	false when dictionary is empty or else throw an ArgumentNullException.
	* NameValueCollection.cs: Added missing Rank check in CopyTo (Array,
	int).

svn path=/trunk/mcs/; revision=29534
2004-06-14 19:12:47 +00:00
Sebastien Pouliot a897118880 2004-06-05 Sebastien Pouliot <[email protected]>
* HybridDictionary.cs: Fixed Contains for null argument.
	* NameValueCollection.cs: Fixed Set to remove existing values. Fixed
	Add(NVC) to throw same exception as MS implementation.

svn path=/trunk/mcs/; revision=28891
2004-06-05 23:50:40 +00:00
Lluis Sanchez 013f0130e1 * StringCollection.cs: Renamed internal variable to make serialization
compatible with MS.NET.

svn path=/trunk/mcs/; revision=27962
2004-05-24 11:33:48 +00:00
Gonzalo Paniagua Javier 93973d690f 2004-03-23 Gonzalo Paniagua Javier <[email protected]>
* ListDictionary.cs: mark ListEntry as serializable. Thanks to Jan
	Jaros.

svn path=/trunk/mcs/; revision=24473
2004-03-23 17:27:09 +00:00
Gonzalo Paniagua Javier 429226eafa 2004-03-15 Gonzalo Paniagua Javier <[email protected]>
* System.dll.sources: added ProcessStringDictionary.

	* System.Collections.Specialized/ProcessStringDictionary.cs: the same
	as StringDictionary, but doesn't turn keys into lowercase.

	* System.Diagnostics/Process.cs: added environment variables setting
	support and also send useShellExecute to the runtime.

	* System.Diagnostics/ProcessStartInfo.cs: support EnvironmentVariables.
	MS uses StringDictionary, which turns keys into lowercase. We don't
	do that.

svn path=/trunk/mcs/; revision=24068
2004-03-15 21:19:08 +00:00
Todd Berman 54796c8886 2003-11-18 Todd Berman <[email protected]>
* IOrderedDictionary.cs: new v2 interface

svn path=/trunk/mcs/; revision=20206
2003-11-19 01:46:48 +00:00
Gonzalo Paniagua Javier 43f3a01c49 2003-10-21 Gonzalo Paniagua Javier <[email protected]>
* NameObjectCollectionBase.cs: added serialization support.

svn path=/trunk/mcs/; revision=19264
2003-10-21 10:54:22 +00:00
Duncan Mak e61457e5ba Integrate the patches contributed by Alon Gazit <[email protected]>.
* BitVector32.cs (CreateSection): Check that the new
calculated offset isn't more than 32 and not that the sum of the
new offset and the number of set bits is more than 32.
(this): Perform bitwise and with the complement of the mask
shifted version (~(section.Mask << section.Offset)) and not with
the shifted version of the mask's complement (~section.Mask <<
section.Offset).
(this): Currently doesn't return the correct value when the data
in the BitVector32 instance is negative.

* ListDictionary.cs (CopyTo): If the array is null, it should
throw ArgumentNullException. If the index is less than 0, it
should throw ArgumentOutOfRangeException.
(Remove): Throw ArgumentNullException when the parameter is null.

* BitVector32Test.cs (TestNegativeIndexer, TestSectionIndexer,
TestCreateSection): new tests from Alon Gazit <[email protected]>.

* ListDictionaryTest.cs (CopyTo1, CopyTo2, Remove): New file, with
tests from Alon Gazit <[email protected]>.

svn path=/trunk/mcs/; revision=17885
2003-09-04 19:16:30 +00:00
Andreas N 2915b7221f 2003-07-17 Andreas Nahr <[email protected]>
* StringDictionary.cs: Reworked attributes based on the new Consts scheme

svn path=/trunk/mcs/; revision=16336
2003-07-17 11:21:03 +00:00
Andreas N 3bc4589969 2003-07-10 Andreas Nahr <[email protected]>
* NameObjectCollectionBase.cs: Implemented a few missing methods, fixed public signatures

svn path=/trunk/mcs/; revision=16108
2003-07-10 16:57:34 +00:00
Andreas N 9f4c4a035f 2003-07-09 Andreas Nahr <[email protected]>
* NameObjectCollectionBase.cs: Fixed signature to be CLSCompliant, changed/corrected header
	* StringCollection.cs: Improved implementation (should perform better)

svn path=/trunk/mcs/; revision=16092
2003-07-10 14:13:55 +00:00
Andreas N 4014760d0b 2003-07-02 Andreas Nahr <[email protected]>
* BitVector32.cs: Implemented missing method
	* NameValueCollection.cs: Fixed public signature, Styleguidelined header
	* StringDictionary.cs: Added missing attribute, fixed visibilities

svn path=/trunk/mcs/; revision=15879
2003-07-02 22:06:24 +00:00
Ben Maurer 9102ceb52e 2003-06-08 Ben Maurer <[email protected]>
* StringCollection.cs: Rewrote. Now uses ArrayList. Fixes up quite
	a few Rotor bugs.
	* ArrayList.cs, Hashtable.cs, SortedList.cs: Enumerator fixes, error
	checking
We are now passing 37% of the System.Collections.* tests that were failing!

svn path=/trunk/mcs/; revision=15207
2003-06-09 00:41:39 +00:00
Miguel de Icaza 77c3b5453b 2003-03-03 Miguel de Icaza <[email protected]>
* NameValueCollection.cs: Uncoment constructor, an old MCS bug
	prevented this from working.  Removed test for nullitude of col,
	as it would have aborted anyways on the dereference in the base
	constructor call.

svn path=/trunk/mcs/; revision=12163
2003-03-03 23:13:02 +00:00
Gonzalo Paniagua Javier db545706f5 2003-01-12 Gonzalo Paniagua Javier <[email protected]>
* StringCollection.cs: fixed range checks in CopyTo.

svn path=/trunk/mcs/; revision=10407
2003-01-12 08:37:20 +00:00
Daniel Stodden ae48010ffe * ListDictionary.cs:
- Filled in missing CopyTo()s.
		- No, overwriting an entry should not change the Count <:)

svn path=/trunk/mcs/; revision=8858
2002-11-06 21:23:18 +00:00
Gonzalo Paniagua Javier 0bd4fc901a 2002-10-31 Gonzalo Paniagua Javier <[email protected]>
* NameValueCollection.cs: fixed Add (NameValueCollection).

svn path=/trunk/mcs/; revision=8694
2002-10-31 03:41:05 +00:00