[System] Collections from CoreFX
authorMarek Safar <marek.safar@gmail.com>
Mon, 6 Mar 2017 17:05:23 +0000 (18:05 +0100)
committerMarek Safar <marek.safar@gmail.com>
Wed, 8 Mar 2017 13:26:27 +0000 (14:26 +0100)
mcs/class/System/Makefile
mcs/class/System/ReferenceSources/SR.cs
mcs/class/System/common.sources
mcs/class/System/corefx/SR.cs
mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs

index 19dcfaee7342b48ab5ba0a6cfd14a97457224dd9..c71e98acfbb3de983040762641d00a4dd7083846 100644 (file)
@@ -15,7 +15,8 @@ RESOURCE_FILES = \
 endif
 
 RESX_RESOURCE_STRING = \
-       ../../../external/corefx/src/System.Collections.Concurrent/src/Resources/Strings.resx
+       ../../../external/corefx/src/System.Collections.Concurrent/src/Resources/Strings.resx \
+       ../../../external/corefx/src/System.Collections/src/Resources/Strings.resx
 
 TEST_RESOURCES = \
        Test/System/test-uri-props.txt \
index cacc4936713bee9763ce770c887752488e901b85..7fd9f4e617cb14446f1c0b378f89c4cf8428b896 100644 (file)
@@ -73,37 +73,8 @@ partial class SR
        public const string Argument_FrameworkNameInvalidVersion = "FrameworkName version component is invalid.";
        public const string Argument_FrameworkNameMissingVersion = "FrameworkName version component is missing.";
        public const string ArgumentNull_Key = "Key cannot be null.";
-       public const string Argument_AddingDuplicate = "An entry with the same key already exists.";
        public const string Argument_InvalidValue = "Argument {0} should be larger than {1}.";
-       public const string ArgumentOutOfRange_NeedNonNegNum = "Index is less than zero.";
-       public const string ArgumentOutOfRange_InvalidThreshold = "The specified threshold for creating dictionary is out of range.";
-       public const string InvalidOperation_EnumFailedVersion = "Collection was modified after the enumerator was instantiated.";
-       public const string InvalidOperation_EnumOpCantHappen = "Enumerator is positioned before the first element or after the last element of the collection.";
        public const string Arg_MultiRank = "Multi dimension array is not supported on this operation.";
-       public const string Arg_NonZeroLowerBound = "The lower bound of target array must be zero.";
-       public const string Arg_InsufficientSpace = "Insufficient space in the target location to copy the information.";
-       public const string NotSupported_EnumeratorReset = "Reset is not supported on the Enumerator.";
-       public const string Invalid_Array_Type = "Target array type is not compatible with the type of items in the collection.";
-       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 collection are missing.";
-       public const string Serialization_MismatchedCount = "The serialized Count information doesn't match the number of items.";
-       public const string ExternalLinkedListNode = "The LinkedList node does not belong to current LinkedList.";
-       public const string LinkedListNodeIsAttached = "The LinkedList node already belongs to a LinkedList.";
-       public const string LinkedListEmpty = "The LinkedList is empty.";
-       public const string Arg_WrongType = "The value \"{0}\" isn't of type \"{1}\" and can't be used in this generic collection.";
-       public const string Argument_ItemNotExist = "The specified item does not exist in this KeyedCollection.";
-       public const string Argument_ImplementIComparable = "At least one object must implement IComparable.";
-       public const string InvalidOperation_EmptyCollection = "This operation is not valid on an empty collection.";
-       public const string InvalidOperation_EmptyQueue = "Queue empty.";
-       public const string InvalidOperation_EmptyStack = "Stack empty.";
-       public const string InvalidOperation_CannotRemoveFromStackOrQueue = "Removal is an invalid operation for Stack or Queue.";
-       public const string ArgumentOutOfRange_Index = "Index was out of range. Must be non-negative and less than the size of the collection.";
-       public const string ArgumentOutOfRange_SmallCapacity = "capacity was less than the current size.";
-       public const string Arg_ArrayPlusOffTooSmall = "Destination array is not long enough to copy all the items in the collection. Check array index and length.";
-       public const string NotSupported_KeyCollectionSet = "Mutating a key collection derived from a dictionary is not allowed.";
-       public const string NotSupported_ValueCollectionSet = "Mutating a value collection derived from a dictionary is not allowed.";
-       public const string NotSupported_ReadOnlyCollection = "Collection is read-only.";
-       public const string NotSupported_SortedListNestedWrite = "This operation is not supported on SortedList nested types because they require modifying the original SortedList.";
        public const string Barrier_ctor_ArgumentOutOfRange = "The participantCount argument must be non-negative and less than or equal to 32767.";
        public const string Barrier_AddParticipants_NonPositive_ArgumentOutOfRange = "The participantCount argument must be a positive value.";
        public const string Barrier_AddParticipants_Overflow_ArgumentOutOfRange = "Adding participantCount participants would result in the number of participants exceeding the maximum number allowed.";
@@ -268,7 +239,6 @@ partial class SR
        public const string CountTooSmall = "Count cannot be less than -1.";
        public const string EnumNotStarted = "Enumeration has either not started or has already finished.";
        public const string Arg_InvalidArrayType = "Target array type is not compatible with the type of items in the collection.";
-       public const string Arg_RankMultiDimNotSupported = "Only single dimensional arrays are supported for the requested action.";
        public const string RegexMatchTimeoutException_Occurred = "The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.";
        public const string IllegalDefaultRegexMatchTimeoutInAppDomain = "AppDomain data '{0}' contains an invalid value or object for specifying a default matching timeout for System.Text.RegularExpressions.Regex.";
        public const string FileObject_AlreadyOpen = "The file is already open.  Call Close before trying to open the FileObject again.";
@@ -297,7 +267,6 @@ partial class SR
        public const string Arg_EmptyOrNullArray = "Array cannot be empty or null.";
        public const string Argument_InvalidClassAttribute = "The value of \"class\" attribute is invalid.";
        public const string Argument_InvalidNameType = "The value of \"nameType\" is invalid.";
-       public const string InvalidOperation_EnumNotStarted = "Enumeration has not started.  Call MoveNext.";
        public const string InvalidOperation_DuplicateItemNotAllowed = "Duplicate items are not allowed in the collection.";
        public const string Cryptography_Asn_MismatchedOidInCollection = "The AsnEncodedData object does not have the same OID for the collection.";
        public const string Cryptography_Cms_Envelope_Empty_Content = "Cannot create CMS enveloped for empty content.";
@@ -1351,7 +1320,6 @@ partial class SR
        public const string Arg_InvalidSerialPort = "The given port name does not start with COM/com or does not resolve to a valid serial port.";
        public const string Arg_InvalidSerialPortExtended = "The given port name is invalid.  It may be a valid port, but not a serial port.";
        public const string Arg_SecurityException = "The port name cannot start with '\\'.";
-       public const string Argument_InvalidOffLen = "Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";
        public const string ArgumentNull_Array = "Array cannot be null.";
        public const string ArgumentNull_Buffer = "Buffer cannot be null.";
        public const string ArgumentOutOfRange_Bounds_Lower_Upper = "Argument must be between {0} and {1}.";
@@ -1538,7 +1506,6 @@ partial class SR
        public const string KeyedCollKeyNotFound = "Cannot find the key {0} in the collection.";
        public const string KeyedCollInvalidKey = "Keys must be non-null non-empty Strings.";
        public const string KeyedCollCapacityOverflow = "Capacity overflowed and went negative.  Check capacity of the collection.";
-       public const string InvalidOperation_EnumEnded = "The enumeration has already completed.";
        public const string OrderedDictionary_ReadOnly = "The OrderedDictionary is readonly and cannot be modified.";
        public const string OrderedDictionary_SerializationMismatch = "There was an error deserializing the OrderedDictionary.  The ArrayList does not contain DictionaryEntries.";
        public const string Async_ExceptionOccurred = "An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.";
index 63ca1a082a287fa62c8336e7b5a5ab24a26cc782..15322fe8fc26a42a87007a96db58e7da3639c757 100644 (file)
@@ -354,18 +354,6 @@ ReferenceSources/Win32Exception.cs
 ../referencesource/System/regex/system/text/regularexpressions/compiledregexrunner.cs
 ../referencesource/System/regex/system/text/regularexpressions/compiledregexrunnerfactory.cs
 
-../referencesource/System/compmod/system/collections/generic/bithelper.cs
-../referencesource/System/compmod/system/collections/generic/debugview.cs
-../referencesource/System/compmod/system/collections/generic/iset.cs
-../referencesource/System/compmod/system/collections/generic/linkedlist.cs
-../referencesource/System/compmod/system/collections/generic/queue.cs
-../referencesource/System/compmod/system/collections/generic/sorteddictionary.cs
-../referencesource/System/compmod/system/collections/generic/sortedlist.cs
-../referencesource/System/compmod/system/collections/generic/sortedset.cs
-../referencesource/System/compmod/system/collections/generic/sortedsetdebugview.cs
-../referencesource/System/compmod/system/collections/generic/stack.cs
-../referencesource/System/compmod/system/collections/generic/throwhelper.cs
-
 ../referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs
 ../referencesource/System/compmod/system/collections/objectmodel/readonlyobservablecollection.cs
 
@@ -923,11 +911,32 @@ ReferenceSources/Win32Exception.cs
 
 corefx/SR.cs
 
-../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
+../../../external/corefx/src/Common/src/System/Collections/Generic/ArrayBuilder.cs
+../../../external/corefx/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs
+../../../external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs
+
+../../../external/corefx/src/System.Runtime/src/System/Collections/Generic/ISet.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.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
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/QueueDebugView.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/SortedDictionary.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/SortedList.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/SortedSet.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/SortedSet.TreeSubSet.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/SortedSetEqualityComparer.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/Stack.cs
+../../../external/corefx/src/System.Collections/src/System/Collections/Generic/StackDebugView.cs
 
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/BlockingCollection.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentBag.cs
+../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/CDSCollectionETWBCLProvider.cs
 
 ../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/CompressionLevel.cs
 ../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs
 ../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/GZipStream.cs
+
+../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
index 892f0113ccf8666782a64fac039b632a42e932ce..d4b44ad444f0da93bb11458becea41b652001cc9 100644 (file)
@@ -45,4 +45,38 @@ partial class SR
        public const string PartitionerStatic_CanNotCallGetEnumeratorAfterSourceHasBeenDisposed = "Can not call GetEnumerator on partitions after the source enumerable is disposed";
        public const string PartitionerStatic_CurrentCalledBeforeMoveNext = "MoveNext must be called at least once before calling Current.";
        public const string ConcurrentBag_Enumerator_EnumerationNotStartedOrAlreadyFinished = "Enumeration has either not started or has already finished.";
+       public const string Arg_NonZeroLowerBound = "The lower bound of target array must be zero.";
+       public const string Arg_WrongType = "The value '{0}' is not of type '{1}' and cannot be used in this generic collection.";
+       public const string Arg_ArrayPlusOffTooSmall = "Destination array is not long enough to copy all the items in the collection. Check array index and length.";
+       public const string ArgumentOutOfRange_NeedNonNegNum = "Non-negative number required.";
+       public const string ArgumentOutOfRange_SmallCapacity = "capacity was less than the current size.";
+       public const string Argument_InvalidOffLen = "Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.";
+       public const string Argument_AddingDuplicate = "An item with the same key has already been added. Key: {0}";
+       public const string InvalidOperation_EmptyQueue = "Queue empty.";
+       public const string InvalidOperation_EnumOpCantHappen = "Enumeration has either not started or has already finished.";
+       public const string InvalidOperation_EnumFailedVersion = "Collection was modified; enumeration operation may not execute.";
+       public const string InvalidOperation_EmptyStack = "Stack empty.";
+       public const string InvalidOperation_EnumNotStarted = "Enumeration has not started. Call MoveNext.";
+       public const string InvalidOperation_EnumEnded = "Enumeration already finished.";
+       public const string NotSupported_KeyCollectionSet = "Mutating a key collection derived from a dictionary is not allowed.";
+       public const string NotSupported_ValueCollectionSet = "Mutating a value collection derived from a dictionary is not allowed.";
+       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 Arg_HSCapacityOverflow = "HashSet capacity is too big.";
+       public const string Arg_HTCapacityOverflow = "Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table.";
+       public const string Arg_InsufficientSpace = "Insufficient space in the target location to copy the information.";
+       public const string Arg_RankMultiDimNotSupported = "Only single dimensional arrays are supported for the requested action.";
+       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 Argument_InvalidArrayType = "Target array type is not compatible with the type of items in the collection.";
+       public const string ArgumentOutOfRange_BiggerThanCollection = "Must be less than or equal to the size of the collection.";
+       public const string ArgumentOutOfRange_Index = "Index was out of range. Must be non-negative and less than the size of the collection.";
+       public const string ExternalLinkedListNode = "The LinkedList node does not belong to current LinkedList.";
+       public const string LinkedListEmpty = "The LinkedList is empty.";
+       public const string LinkedListNodeIsAttached = "The LinkedList node already belongs to a LinkedList.";
+       public const string NotSupported_SortedListNestedWrite = "This operation is not supported on SortedList nested types because they require modifying the original SortedList.";
+       public const string SortedSet_LowerValueGreaterThanUpperValue = "Must be less than or equal to upperValue.";
+       public const string Serialization_InvalidOnDeser = "OnDeserialization method was called while the object was not being deserialized.";
+       public const string Serialization_MismatchedCount = "The serialized Count information doesn't match the number of items.";
+       public const string Serialization_MissingKeys = "The keys for this dictionary are missing.";
+       public const string Serialization_MissingValues = "The values for this dictionary are missing.";
 }
index e6ebd1ff2aa8aace6e9f3649a0474baff66891aa..f93c538069a8246f93c83129caabd3b90242caa1 100644 (file)
@@ -184,5 +184,11 @@ namespace System.Runtime.CompilerServices
 
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                static extern void RunModuleConstructor (IntPtr module);
+
+               [MonoTODO]
+               public static bool IsReferenceOrContainsReferences<T>()
+               {
+                       return true;
+               }
        }
 }