From 1bdcf19169745f17db7f13b15f4dd566d1bf654f Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Fri, 23 Mar 2018 18:23:27 +0300 Subject: [PATCH] [corlib] System.Collections from CoreFX (#7478) --- external/api-snapshot | 2 +- .../Test/System.Web.DynamicData/MetaColumnTest.cs | 10 +-- mcs/class/System/Makefile | 3 +- mcs/class/System/common.sources | 37 +++++----- mcs/class/System/corefx/NameValueCollection.cs | 17 +++++ mcs/class/System/corefx/StringDictionary.cs | 27 +++++++ mcs/class/corlib/Makefile | 1 + mcs/class/corlib/System/Array.cs | 1 - mcs/class/corlib/corefx/SR.cs | 20 ++++++ mcs/class/corlib/corlib.dll.sources | 82 ++++++++-------------- mcs/class/corlib/corlib_xtest.dll.sources | 54 ++++++++++++++ .../collections/specialized/stringdictionary.cs | 6 +- .../referencesource/mscorlib/system/throwhelper.cs | 21 +++++- 13 files changed, 198 insertions(+), 83 deletions(-) create mode 100644 mcs/class/System/corefx/NameValueCollection.cs create mode 100644 mcs/class/System/corefx/StringDictionary.cs diff --git a/external/api-snapshot b/external/api-snapshot index 37d5e23a707..a47409728af 160000 --- a/external/api-snapshot +++ b/external/api-snapshot @@ -1 +1 @@ -Subproject commit 37d5e23a7076c651fcfce0e63759c21f46213275 +Subproject commit a47409728af35971a1c2c077c89fd0dc39ac1cda diff --git a/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/MetaColumnTest.cs b/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/MetaColumnTest.cs index d45102977f8..fa18a7e3b64 100644 --- a/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/MetaColumnTest.cs +++ b/mcs/class/System.Web.DynamicData/Test/System.Web.DynamicData/MetaColumnTest.cs @@ -109,32 +109,32 @@ namespace MonoTests.System.Web.DynamicData MetaColumn mc = t.GetColumn ("ColumnNoAttributes"); Assert.IsNotNull (mc, "#A1"); Assert.IsNotNull (mc.Attributes, "#A2"); - Assert.AreEqual (5, mc.Attributes.Count, "#A3"); + Assert.AreEqual (4, mc.Attributes.Count, "#A3"); Assert.IsTrue (mc.IsRequired, "#A3-1"); mc = t.GetColumn ("ColumnFormatInEditMode"); Assert.IsNotNull (mc, "#A4"); Assert.IsNotNull (mc.Attributes, "#A4-1"); - Assert.AreEqual (6, mc.Attributes.Count, "#A4-2"); + Assert.AreEqual (5, mc.Attributes.Count, "#A4-2"); Assert.AreEqual (1, mc.Attributes.OfType ().Count (), "#A4-3"); mc = t.GetColumn ("ColumnWithDataType"); Assert.IsNotNull (mc, "#A5"); Assert.IsNotNull (mc.Attributes, "#A5-1"); - Assert.AreEqual (6, mc.Attributes.Count, "#A5-2"); + Assert.AreEqual (5, mc.Attributes.Count, "#A5-2"); Assert.AreEqual (1, mc.Attributes.OfType ().Count (), "#A5-3"); t = m.Tables[TestDataContext.TableFooWithMetadataType]; mc = t.GetColumn ("Column1"); Assert.IsNotNull (mc, "#B1"); Assert.IsNotNull (mc.Attributes, "#B1-1"); - Assert.AreEqual (8, mc.Attributes.Count, "#B1-2"); + Assert.AreEqual (7, mc.Attributes.Count, "#B1-2"); Assert.AreEqual (1, mc.Attributes.OfType ().Count (), "#B1-3"); mc = t.GetColumn ("Column2"); Assert.IsNotNull (mc, "#B2"); Assert.IsNotNull (mc.Attributes, "#B2-1"); - Assert.AreEqual (7, mc.Attributes.Count, "#B2-2"); + Assert.AreEqual (6, mc.Attributes.Count, "#B2-2"); Assert.AreEqual (1, mc.Attributes.OfType ().Count (), "#B2-3"); } diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile index 39171827fae..e3c2adc9f6b 100644 --- a/mcs/class/System/Makefile +++ b/mcs/class/System/Makefile @@ -29,9 +29,8 @@ TEST_RESOURCES = \ Test/System/test-uri-relative-props.txt USE_XTEST_REMOTE_EXECUTOR = YES -XTEST_LIB_FLAGS := -d:MONO_COREFX XTEST_LIB_REFS = System System.Core System.Net Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Net.Http -LIB_MCS_FLAGS = -d:CONFIGURATION_2_0 -d:XML_DEP -d:SECURITY_DEP $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%) -nowarn:436 +LIB_MCS_FLAGS = -d:COREFX -d:CONFIGURATION_2_0 -d:XML_DEP -d:SECURITY_DEP $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%) -nowarn:436 ifndef NO_MONO_SECURITY MONO_SECURITY := Mono.Security diff --git a/mcs/class/System/common.sources b/mcs/class/System/common.sources index a7563327fd0..8c4e205e897 100644 --- a/mcs/class/System/common.sources +++ b/mcs/class/System/common.sources @@ -1,8 +1,6 @@ Assembly/AssemblyInfo.cs ../../build/common/SR.cs -corefx/SR.cs - -corefx/ZLibNative.cs +corefx/*.cs Microsoft.Win32.SafeHandles/SafeX509ChainHandle.cs @@ -306,23 +304,21 @@ ReferenceSources/Win32Exception.cs ../../../external/corefx/src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCollectionDebuggerProxy.cs ../../../external/corefx/src/Common/src/System/NotImplemented.cs -../referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs -../referencesource/System/compmod/system/collections/objectmodel/readonlyobservablecollection.cs - -../referencesource/System/compmod/system/collections/specialized/bitvector32.cs -../referencesource/System/compmod/system/collections/specialized/casesensitivestringdictionary.cs -../referencesource/System/compmod/system/collections/specialized/collectionsutil.cs -../referencesource/System/compmod/system/collections/specialized/hybriddictionary.cs -../referencesource/System/compmod/system/collections/specialized/inotifycollectionchanged.cs -../referencesource/System/compmod/system/collections/specialized/iordereddictionary.cs -../referencesource/System/compmod/system/collections/specialized/listdictionary.cs -../referencesource/System/compmod/system/collections/specialized/nameobjectcollectionbase.cs -../referencesource/System/compmod/system/collections/specialized/namevaluecollection.cs -../referencesource/System/compmod/system/collections/specialized/notifycollectionchangedeventargs.cs -../referencesource/System/compmod/system/collections/specialized/ordereddictionary.cs -../referencesource/System/compmod/system/collections/specialized/stringcollection.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/BitVector32.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/HybridDictionary.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/IOrderedDictionary.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/ListDictionary.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/OrderedDictionary.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/StringCollection.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/NameValueCollection.cs ../referencesource/System/compmod/system/collections/specialized/stringdictionary.cs -../referencesource/System/compmod/system/collections/specialized/stringdictionarywithcomparer.cs +../../../external/corefx/src/System.Collections.Specialized/src/System/Collections/Specialized/StringDictionary.cs +../referencesource/System/compmod/system/collections/specialized/nameobjectcollectionbase.cs +../referencesource/System/compmod/system/collections/specialized/casesensitivestringdictionary.cs +../../../external/corefx/src/System.Collections.NonGeneric/src/System/Collections/Specialized/CollectionsUtil.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyObservableCollection.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ObservableCollection.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/Specialized/*.cs ../referencesource/System/compmod/system/componentmodel/AddingNewEventArgs.cs ../referencesource/System/compmod/system/componentmodel/AddingNewEventHandler.cs @@ -855,8 +851,6 @@ ReferenceSources/Win32Exception.cs ../referencesource/System/compmod/microsoft/win32/safehandles/SafeProcessHandle.cs -corefx/SR.cs - ../../../external/corefx/src/Common/src/System/StringExtensions.cs ../../../external/corefx/src/Common/src/System/Collections/Generic/ArrayBuilder.cs @@ -880,6 +874,7 @@ corefx/SR.cs ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/BitHelper.cs ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/ICollectionDebugView.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/Generic/DebugView.cs ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/IDictionaryDebugView.cs ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/LinkedList.cs ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/Queue.cs diff --git a/mcs/class/System/corefx/NameValueCollection.cs b/mcs/class/System/corefx/NameValueCollection.cs new file mode 100644 index 00000000000..b7dca40da48 --- /dev/null +++ b/mcs/class/System/corefx/NameValueCollection.cs @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.Serialization; +using System.Text; + +namespace System.Collections.Specialized +{ + partial class NameValueCollection + { + // Allow internal extenders to avoid creating the hashtable/arraylist. + internal NameValueCollection (DBNull dummy) : base (dummy) + { + } + } +} \ No newline at end of file diff --git a/mcs/class/System/corefx/StringDictionary.cs b/mcs/class/System/corefx/StringDictionary.cs new file mode 100644 index 00000000000..21449ce8c35 --- /dev/null +++ b/mcs/class/System/corefx/StringDictionary.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; +using System.Diagnostics; +using System; +using System.Collections; +using System.ComponentModel.Design.Serialization; +using System.Globalization; +using System.Collections.Generic; + +namespace System.Collections.Specialized +{ + partial class StringDictionary + { + internal void ReplaceHashtable (Hashtable useThisHashtableInstead) + { + contents = useThisHashtableInstead; + } + + internal IDictionary AsGenericDictionary () + { + return new GenericAdapter(this); + } + } +} \ No newline at end of file diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index d8e87d037b0..011c09c42f1 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -8,6 +8,7 @@ LIBRARY_NAME = mscorlib.dll LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%) +USE_XTEST_REMOTE_EXECUTOR = YES LIBRARY_WARN_AS_ERROR = yes #LIBRARY_USE_INTERMEDIATE_FILE = yes diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs index c3f04223d84..00433d8b68f 100644 --- a/mcs/class/corlib/System/Array.cs +++ b/mcs/class/corlib/System/Array.cs @@ -49,7 +49,6 @@ namespace System private Array () { } - /* * These methods are used to implement the implicit generic interfaces * implemented by arrays in NET 2.0. diff --git a/mcs/class/corlib/corefx/SR.cs b/mcs/class/corlib/corefx/SR.cs index a69297fa39f..ec5b4344a30 100644 --- a/mcs/class/corlib/corefx/SR.cs +++ b/mcs/class/corlib/corefx/SR.cs @@ -930,4 +930,24 @@ partial class SR public const string ParallelState_Break_InvalidOperationException_BreakAfterStop = "Break was called after Stop was called."; public const string ParallelState_Stop_InvalidOperationException_StopAfterBreak = "Stop was called after Break was called."; public const string ParallelState_NotSupportedException_UnsupportedMethod = "This method is not supported."; + public const string NotSupported_SortedListNestedWrite = "This operation is not supported on SortedList nested types because they require modifying the original SortedList"; + public const string InvalidOperation_EmptyStack = "Stack empty."; + public const string Arg_RemoveArgNotFound = "Cannot remove the specified item because it was not found in the specified Collection."; + public const string ArgumentNull_Dictionary = "Dictionary cannot be null."; + public const string ArgumentOutOfRange_QueueGrowFactor = "Queue grow factor must be between {0} and {1}."; + public const string ArgumentNull_Collection = "Collection cannot be null."; + public const string ArgumentOutOfRange_ArrayListInsert = "Insertion index was out of range. Must be non-negative and less than or equal to size."; + public const string InvalidOperation_UnderlyingArrayListChanged = "This range in the underlying list is invalid. A possible cause is that elements were removed."; + public const string NotSupported_RangeCollection = "The specified operation is not supported on Ranges."; + public const string Argument_ArrayTooLarge = "The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue."; + public const string Arg_ArrayLengthsDiffer = "Array lengths must be the same."; + public const string Arg_BitArrayTypeUnsupported = "Only supported array types for CopyTo on BitArrays are Boolean[], Int32[] and Byte[]."; + public const string ArgumentOutOfRange_InvalidThreshold = "The specified threshold for creating dictionary is out of range."; + public const string Argument_ItemNotExist = "The specified item does not exist in this KeyedCollection."; + public const string Arg_CannotMixComparisonInfrastructure = "The usage of IKeyComparer and IHashCodeProvider/IComparer interfaces cannot be mixed; use one or the other."; + public const string ArgumentOutOfRange_HashtableLoadFactor = "Load factor needs to be between 0.1 and 1.0."; + public const string InvalidOperation_HashInsertFailed = "Hashtable insert failed. Load factor too high. The most common cause is multiple threads writing to the Hashtable simultaneously."; + public const string Serialization_InvalidOnDeser = "OnDeserialization method was called while the object was not being deserialized."; + public const string Serialization_MissingValues = "The Values for this Hashtable are missing."; + public const string Serialization_KeyValueDifferentSizes = "The keys and values arrays have different sizes."; } diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index 308e6dffc46..51d8ee362ac 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -1038,54 +1038,39 @@ ReferenceSources/Type.cs ../referencesource/mscorlib/system/AppContext/AppContextSwitches.cs ReferenceSources/AppContextDefaultValues.cs -../referencesource/mscorlib/system/collections/arraylist.cs -../referencesource/mscorlib/system/collections/bitarray.cs -../referencesource/mscorlib/system/collections/caseinsensitivecomparer.cs -../referencesource/mscorlib/system/collections/caseinsensitivehashcodeprovider.cs -../referencesource/mscorlib/system/collections/collectionbase.cs -../referencesource/mscorlib/system/collections/comparer.cs -../referencesource/mscorlib/system/collections/compatiblecomparer.cs -../referencesource/mscorlib/system/collections/dictionarybase.cs -../referencesource/mscorlib/system/collections/emptyreadonlydictionaryinternal.cs -../referencesource/mscorlib/system/collections/hashtable.cs -../referencesource/mscorlib/system/collections/icollection.cs -../referencesource/mscorlib/system/collections/icomparer.cs -../referencesource/mscorlib/system/collections/idictionary.cs -../referencesource/mscorlib/system/collections/idictionaryenumerator.cs -../referencesource/mscorlib/system/collections/ienumerable.cs -../referencesource/mscorlib/system/collections/ienumerator.cs -../referencesource/mscorlib/system/collections/iequalitycomparer.cs -../referencesource/mscorlib/system/collections/ihashcodeprovider.cs -../referencesource/mscorlib/system/collections/ilist.cs -../referencesource/mscorlib/system/collections/istructuralcomparable.cs -../referencesource/mscorlib/system/collections/istructuralequatable.cs -../referencesource/mscorlib/system/collections/keyvaluepairs.cs -../referencesource/mscorlib/system/collections/listdictionaryinternal.cs -../referencesource/mscorlib/system/collections/objectmodel/collection.cs -../referencesource/mscorlib/system/collections/objectmodel/keyedcollection.cs -../referencesource/mscorlib/system/collections/objectmodel/readonlycollection.cs -../referencesource/mscorlib/system/collections/objectmodel/readonlydictionary.cs -../referencesource/mscorlib/system/collections/queue.cs -../referencesource/mscorlib/system/collections/readonlycollectionbase.cs -../referencesource/mscorlib/system/collections/sortedlist.cs -../referencesource/mscorlib/system/collections/stack.cs -../referencesource/mscorlib/system/collections/structuralcomparisons.cs - +../../../external/corefx/src/System.Runtime.Extensions/src/System/Collections/ArrayList.cs +../../../external/corefx/src/System.Collections.NonGeneric/src/System/Collections/*.cs +../../../external/corefx/src/System.Collections/src/System/Collections/BitArray.cs +../../../external/corefx/src/System.Collections/src/System/Collections/StructuralComparisons.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/Comparer.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/ICollection.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IComparer.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IDictionary.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IDictionaryEnumerator.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IEnumerable.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IEnumerator.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IEqualityComparer.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IList.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IStructuralComparable.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/IStructuralEquatable.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/ListDictionaryInternal.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/*.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/Collection.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/ObjectModel/ReadOnlyCollection.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs +../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs +../../../external/corefx/src/Common/src/System/Collections/CompatibleComparer.cs +../../../external/corefx/src/System.Runtime.Extensions/src/System/Collections/Hashtable.cs +../../../external/corefx/src/System.Runtime.Extensions/src/System/Collections/IHashCodeProvider.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/Generic/DebugView.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/KeyedCollection.cs +../../../external/corefx/src/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyDictionary.cs ../referencesource/mscorlib/system/collections/generic/comparer.cs -../referencesource/mscorlib/system/collections/generic/debugview.cs ../referencesource/mscorlib/system/collections/generic/equalitycomparer.cs -../referencesource/mscorlib/system/collections/generic/icollection.cs -../referencesource/mscorlib/system/collections/generic/icomparer.cs -../referencesource/mscorlib/system/collections/generic/idictionary.cs -../referencesource/mscorlib/system/collections/generic/ienumerable.cs -../referencesource/mscorlib/system/collections/generic/ienumerator.cs -../referencesource/mscorlib/system/collections/generic/iequalitycomparer.cs -../referencesource/mscorlib/system/collections/generic/ilist.cs -../referencesource/mscorlib/system/collections/generic/ireadonlycollection.cs -../referencesource/mscorlib/system/collections/generic/ireadonlydictionary.cs -../referencesource/mscorlib/system/collections/generic/ireadonlylist.cs -../referencesource/mscorlib/system/collections/generic/keynotfoundexception.cs -../referencesource/mscorlib/system/collections/generic/list.cs +../referencesource/mscorlib/system/collections/emptyreadonlydictionaryinternal.cs ../referencesource/mscorlib/system/diagnostics/assert.cs ../referencesource/mscorlib/system/diagnostics/assertfilter.cs @@ -1691,11 +1676,6 @@ corefx/MemoryExtensions.cs ../../../external/corefx/src/Common/src/CoreLib/System/Buffers/MemoryHandle.cs ../../../external/corefx/src/Common/src/CoreLib/System/Buffers/OwnedMemory.cs -../../../external/corefx/src/Common/src/CoreLib/System/Collections/DictionaryEntry.cs - -../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs -../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/IDictionaryDebugView.cs -../../../external/corefx/src/Common/src/CoreLib/System/Collections/Generic/KeyValuePair.cs ../../../external/corefx/src/Common/src/CoreLib/System/Diagnostics/StackTraceHiddenAttribute.cs diff --git a/mcs/class/corlib/corlib_xtest.dll.sources b/mcs/class/corlib/corlib_xtest.dll.sources index 2f47c9e734c..38415f7f97e 100644 --- a/mcs/class/corlib/corlib_xtest.dll.sources +++ b/mcs/class/corlib/corlib_xtest.dll.sources @@ -179,9 +179,63 @@ # System.Threading ../../../external/corefx/src/System.Threading/tests/*.cs:MutexTests.cs,SemaphoreTests.cs,InterlockedTests.netcoreapp.cs,EventWaitHandleTests.cs,XunitAssemblyAttributes.cs,ReaderWriterLockTests.cs,SynchronizationContextTests.cs,ExecutionContextTests.cs,HostExecutionContextManagerTests.cs,EtwTests.cs +# System.Memory ../../../external/corefx/src/System.Memory/tests/*.cs ../../../external/corefx/src/System.Memory/tests/Binary/*.cs ../../../external/corefx/src/System.Memory/tests/Memory/*.cs ../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs ../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs ../../../external/corefx/src/System.Memory/tests/Span/*.cs + +# System.Collections +../../../external/corefx/src/Common/tests/System/Collections/CollectionAsserts.cs +../../../external/corefx/src/Common/tests/System/Collections/TestBase.NonGeneric.cs +../../../external/corefx/src/Common/tests/System/Collections/TestBase.Generic.cs +../../../external/corefx/src/Common/tests/System/Collections/TestingTypes.cs +../../../external/corefx/src/Common/tests/System/Collections/IList.NonGeneric.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IList.Generic.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/ICollection.NonGeneric.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/ICollection.Generic.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IDictionary.NonGeneric.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IDictionary.Generic.Tests.cs +#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Serialization.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.NonGeneric.Tests.cs +#../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Serialization.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IEnumerable.Generic.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/ISet.Generic.Tests.cs +../../../external/corefx/src/Common/tests/System/Collections/IGenericSharedAPI.Tests.cs +../../../external/corefx/src/Common/tests/System/EnumTypes.cs +../../../external/corefx/src/Common/tests/System/ObjectCloner.cs +../../../external/corefx/src/Common/tests/System/Diagnostics/DebuggerAttributes.cs +../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/Stack/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/SortedList/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/SortedDictionary/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/Queue/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/List/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/LinkedList/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/*.cs +../../../external/corefx/src/System.Collections/tests/Generic/Comparers/*.cs +../../../external/corefx/src/System.Collections/tests/BitArray/*.cs:BitArray_GetSetTests.cs +../../../external/corefx/src/System.Collections/tests/*.cs + +# System.Collections.NonGeneric +#../../../external/corefx/src/System.Collections.NonGeneric/tests/ArrayList/*.cs +../../../external/corefx/src/System.Collections.NonGeneric/tests/Hashtable/*.cs +../../../external/corefx/src/System.Collections.NonGeneric/tests/*.cs:SortedListTests.cs,CollectionBaseTests.cs,DictionaryBaseTests.cs,ArrayListTests.cs,ReadOnlyCollectionBaseTests.cs + +# System.Collections.Concurrent +../../../external/corefx/src/System.Collections.Concurrent/tests/ConcurrentDictionary/*.cs +../../../external/corefx/src/System.Collections.Concurrent/tests/*.cs:ProducerConsumerCollectionTests.cs,EtwTests.cs,ConcurrentBagTests.cs,ConcurrentQueueTests.cs,ConcurrentStackTests.cs + +# System.Collections.Specialized +../../../external/corefx/src/System.Collections.Specialized/tests/StringDictionary/*.cs +../../../external/corefx/src/System.Collections.Specialized/tests/NameObjectCollectionBase/*.cs:NameObjectCollectionBase.KeysTests.cs,NameObjectCollectionBase.CopyToTests.cs +#../../../external/corefx/src/System.Collections.Specialized/tests/NameValueCollection/*.cs +../../../external/corefx/src/System.Collections.Specialized/tests/ListDictionary/*.cs +../../../external/corefx/src/System.Collections.Specialized/tests/HybridDictionary/*.cs +../../../external/corefx/src/System.Collections.Specialized/tests/OrderedDictionary/*.cs +../../../external/corefx/src/System.Collections.Specialized/tests/*.cs:StringCollectionTests.cs diff --git a/mcs/class/referencesource/System/compmod/system/collections/specialized/stringdictionary.cs b/mcs/class/referencesource/System/compmod/system/collections/specialized/stringdictionary.cs index 88f41bd59e2..90d5c9fdb04 100644 --- a/mcs/class/referencesource/System/compmod/system/collections/specialized/stringdictionary.cs +++ b/mcs/class/referencesource/System/compmod/system/collections/specialized/stringdictionary.cs @@ -15,6 +15,7 @@ namespace System.Collections.Specialized { using System.Globalization; using System.Collections.Generic; +#if !COREFX /// /// Implements a hashtable with the key strongly typed to be /// a string rather than an object. @@ -188,12 +189,13 @@ namespace System.Collections.Specialized { internal IDictionary AsGenericDictionary() { return new GenericAdapter(this); } +#endif #region GenericAdapter // // This class is used to make StringDictionary implement IDictionary indirectly. // This is done to prevent StringDictionary be serialized as IDictionary and break its serialization by DataContractSerializer due to a bug in the serialization code. - private class GenericAdapter : IDictionary + class GenericAdapter : IDictionary { StringDictionary m_stringDictionary; @@ -454,5 +456,7 @@ namespace System.Collections.Specialized { #endregion } #endregion +#if !COREFX } +#endif } diff --git a/mcs/class/referencesource/mscorlib/system/throwhelper.cs b/mcs/class/referencesource/mscorlib/system/throwhelper.cs index 7fff27c0086..d4031a2e922 100644 --- a/mcs/class/referencesource/mscorlib/system/throwhelper.cs +++ b/mcs/class/referencesource/mscorlib/system/throwhelper.cs @@ -307,6 +307,23 @@ namespace System { return argumentName; } + private static ArgumentOutOfRangeException GetArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) + { + return new ArgumentOutOfRangeException(GetArgumentName(argument), resource.ToString()); + } + + internal static void ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index() + { + throw GetArgumentOutOfRangeException(ExceptionArgument.startIndex, + ExceptionResource.ArgumentOutOfRange_Index); + } + + internal static void ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count() + { + throw GetArgumentOutOfRangeException(ExceptionArgument.count, + ExceptionResource.ArgumentOutOfRange_Count); + } + // // This function will convert an ExceptionResource enum value to the resource string. // @@ -547,7 +564,9 @@ namespace System { comparer, comparable, exceptions, - exception + exception, + action, + comparison #endif } -- 2.11.4.GIT