From 9972bf87b4f27d9c8f358ef8414ac1ab957a2f0f Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 19 Feb 2014 22:12:43 +0000 Subject: Imported Upstream version 3.2.8+dfsg --- .../EnumerablePartitionerOptions.xml | 50 ++ .../IReadOnlyCollection`1.xml | 43 + .../IReadOnlyDictionary`2.xml | 122 +++ .../System.Collections.Generic/IReadOnlyList`1.xml | 50 ++ .../ReadOnlyDictionary`2+KeyCollection.xml | 255 ++++++ .../ReadOnlyDictionary`2+ValueCollection.xml | 255 ++++++ .../ReadOnlyDictionary`2.xml | 694 ++++++++++++++++ .../ContractAbbreviatorAttribute.xml | 39 + .../ContractArgumentValidatorAttribute.xml | 39 + .../ContractOptionAttribute.xml | 130 +++ .../en/System.Globalization/CultureInfo.xml | 14 +- .../en/System.Reflection/AssemblyContentType.xml | 50 ++ .../AssemblyMetadataAttribute.xml | 73 ++ .../AssemblySignatureKeyAttribute.xml | 73 ++ .../CustomAttributeExtensions.xml | 894 +++++++++++++++++++++ .../en/System.Reflection/IReflectableType.xml | 32 + .../System.Reflection/IntrospectionExtensions.xml | 38 + .../en/System.Reflection/ReflectionContext.xml | 91 +++ .../RuntimeReflectionExtensions.xml | 250 ++++++ .../en/System.Reflection/TypeInfo.xml | 340 ++++++++ .../en/System.Resources/IResourceReader.xml | 47 +- .../en/System.Resources/IResourceWriter.xml | 68 +- .../MissingManifestResourceException.xml | 49 +- .../MissingSatelliteAssemblyException.xml | 67 +- .../NeutralResourcesLanguageAttribute.xml | 41 +- .../en/System.Resources/ResourceManager.xml | 276 ++++--- .../en/System.Resources/ResourceReader.xml | 74 +- .../en/System.Resources/ResourceSet.xml | 185 +++-- .../en/System.Resources/ResourceWriter.xml | 140 +++- .../SatelliteContractVersionAttribute.xml | 21 +- .../UltimateResourceFallbackLocation.xml | 23 +- .../AsyncStateMachineAttribute.xml | 39 + .../AsyncTaskMethodBuilder.xml | 202 +++++ .../AsyncTaskMethodBuilder`1.xml | 209 +++++ .../AsyncVoidMethodBuilder.xml | 186 +++++ .../CallerFilePathAttribute.xml | 36 + .../CallerLineNumberAttribute.xml | 36 + .../CallerMemberNameAttribute.xml | 36 + ...nfiguredTaskAwaitable+ConfiguredTaskAwaiter.xml | 92 +++ .../ConfiguredTaskAwaitable.xml | 35 + ...iguredTaskAwaitable`1+ConfiguredTaskAwaiter.xml | 96 +++ .../ConfiguredTaskAwaitable`1.xml | 39 + .../ContractHelper.xml | 87 ++ .../ExtensionAttribute.xml | 39 + .../IAsyncStateMachine.xml | 50 ++ .../ICriticalNotifyCompletion.xml | 38 + .../INotifyCompletion.xml | 34 + .../IteratorStateMachineAttribute.xml | 39 + .../StateMachineAttribute.xml | 55 ++ .../TaskAwaiter.xml | 92 +++ .../TaskAwaiter`1.xml | 97 +++ .../YieldAwaitable+YieldAwaiter.xml | 92 +++ .../YieldAwaitable.xml | 35 + .../ExceptionDispatchInfo.xml | 70 ++ .../FirstChanceExceptionEventArgs.xml | 50 ++ ...dleProcessCorruptedStateExceptionsAttribute.xml | 36 + .../DefaultInterfaceAttribute.xml | 55 ++ .../DesignerNamespaceResolveEventArgs.xml | 71 ++ .../EventRegistrationToken.xml | 99 +++ .../EventRegistrationTokenTable`1.xml | 133 +++ .../IActivationFactory.xml | 37 + .../InterfaceImplementedInVersionAttribute.xml | 127 +++ .../NamespaceResolveEventArgs.xml | 89 ++ .../ReadOnlyArrayAttribute.xml | 36 + .../ReturnValueNameAttribute.xml | 55 ++ .../WindowsRuntimeMarshal.xml | 168 ++++ .../WindowsRuntimeMetadata.xml | 94 +++ .../WriteOnlyArrayAttribute.xml | 36 + .../TypeIdentifierAttribute.xml | 86 ++ .../ComponentGuaranteesAttribute.xml | 55 ++ .../ComponentGuaranteesOptions.xml | 78 ++ .../System.Security.AccessControl/AccessRule`1.xml | 132 +++ .../System.Security.AccessControl/AuditRule`1.xml | 132 +++ ...NativeObjectSecurity+ExceptionFromErrorCode.xml | 29 + .../en/System.Security.Policy/EvidenceBase.xml | 48 ++ .../ConcurrentExclusiveSchedulerPair.xml | 157 ++++ .../Documentation/en/System.Threading/Volatile.xml | 768 ++++++++++++++++++ .../corlib/Documentation/en/System/Action.xml | 24 + .../corlib/Documentation/en/System/Action`1.xml | 30 + .../corlib/Documentation/en/System/Action`2.xml | 43 + .../corlib/Documentation/en/System/Action`3.xml | 51 ++ .../corlib/Documentation/en/System/Action`4.xml | 59 ++ .../corlib/Documentation/en/System/Func`1.xml | 33 + .../corlib/Documentation/en/System/Func`2.xml | 42 + .../corlib/Documentation/en/System/Func`3.xml | 50 ++ .../corlib/Documentation/en/System/Func`4.xml | 58 ++ .../corlib/Documentation/en/System/Func`5.xml | 66 ++ .../corlib/Documentation/en/System/IProgress`1.xml | 42 + .../en/System/InvalidTimeZoneException.xml | 88 ++ .../corlib/Documentation/en/System/Progress`1.xml | 108 +++ .../en/System/TimeZoneInfo+AdjustmentRule.xml | 218 +++++ .../en/System/TimeZoneInfo+TransitionTime.xml | 320 ++++++++ .../Documentation/en/System/TimeZoneInfo.xml | 870 ++++++++++++++++++++ .../en/System/TimeZoneNotFoundException.xml | 88 ++ .../Documentation/en/System/WeakReference`1.xml | 140 ++++ .../en/ns-System.Runtime.ExceptionServices.xml | 6 + ...stem.Runtime.InteropServices.WindowsRuntime.xml | 6 + mcs/class/corlib/Makefile | 8 +- .../ConcurrentDictionary.cs | 1 + .../corlib/System.Collections.Generic/List.cs | 87 +- .../corlib/System.Collections/CollectionBase.cs | 2 + .../DebuggerTypeProxyAttribute.cs | 11 +- .../corlib/System.Globalization/CultureInfo.cs | 98 ++- .../corlib/System.Globalization/RegionInfo.cs | 34 +- mcs/class/corlib/System.Globalization/TextInfo.cs | 41 +- mcs/class/corlib/System.IO/Path.cs | 3 +- mcs/class/corlib/System.IO/Stream.cs | 2 +- .../corlib/System.Reflection/MonoParameterInfo.cs | 15 + mcs/class/corlib/System.Reflection/MonoProperty.cs | 2 +- .../corlib/System.Reflection/ParameterInfo.cs | 3 +- .../AsyncTaskMethodBuilder.cs | 11 +- .../AsyncTaskMethodBuilder_T.cs | 11 +- .../ConfiguredTaskAwaitable.cs | 4 + .../ConfiguredTaskAwaitable_T.cs | 4 + .../System.Runtime.CompilerServices/TaskAwaiter.cs | 37 +- .../TaskAwaiter_T.cs | 2 +- .../YieldAwaitable.cs | 4 +- .../DefaultInterfaceAttribute.cs | 46 ++ .../DesignerNamespaceResolveEventArgs.cs | 53 ++ .../EventRegistrationToken.cs | 59 ++ .../EventRegistrationTokenTable.cs | 68 ++ .../IActivationFactory.cs | 38 + .../InterfaceImplementedInVersionAttribute.cs | 71 ++ .../NamespaceResolveEventArgs.cs | 60 ++ .../ReadOnlyArrayAttribute.cs | 37 + .../ReturnValueNameAttribute.cs | 44 + .../WindowsRuntimeMarshal.cs | 72 ++ .../WindowsRuntimeMetadata.cs | 53 ++ .../WriteOnlyArrayAttribute.cs | 37 + .../System.Runtime.InteropServices/Marshal.cs | 102 +++ .../CallContext.cs | 64 +- .../System.Runtime.Remoting.Proxies/RealProxy.cs | 2 +- .../System.Runtime.Remoting/RemotingServices.cs | 2 +- .../X509Certificate.cs | 12 +- .../X509Certificate20.cs | 45 +- .../System.Security.Principal/WindowsIdentity.cs | 2 +- mcs/class/corlib/System.Text/UTF8Encoding.cs | 18 +- mcs/class/corlib/System.Threading.Tasks/Task.cs | 92 ++- .../System.Threading.Tasks/TaskActionInvoker.cs | 13 +- .../System.Threading.Tasks/TaskCompletionSource.cs | 2 +- .../System.Threading.Tasks/TaskContinuation.cs | 57 +- .../corlib/System.Threading.Tasks/TaskFactory.cs | 11 +- .../corlib/System.Threading.Tasks/TaskScheduler.cs | 6 + .../corlib/System.Threading.Tasks/TpScheduler.cs | 2 +- .../System.Threading/CancellationTokenSource.cs | 2 +- mcs/class/corlib/System.Threading/Monitor.cs | 6 +- mcs/class/corlib/System.Threading/NamedDataSlot.cs | 1 + mcs/class/corlib/System.Threading/SemaphoreSlim.cs | 8 +- mcs/class/corlib/System.Threading/Thread.cs | 19 +- mcs/class/corlib/System.Threading/ThreadPool.cs | 15 +- mcs/class/corlib/System.Threading/Timer.cs | 2 +- mcs/class/corlib/System/AggregateException.cs | 2 +- mcs/class/corlib/System/Array.cs | 74 +- mcs/class/corlib/System/ArraySegment.cs | 4 +- mcs/class/corlib/System/Attribute.cs | 2 +- mcs/class/corlib/System/ConsoleKeyInfo.cs | 59 +- mcs/class/corlib/System/Convert.cs | 86 +- mcs/class/corlib/System/Delegate.cs | 2 +- mcs/class/corlib/System/Enum.cs | 5 +- mcs/class/corlib/System/Environment.cs | 2 +- mcs/class/corlib/System/MulticastDelegate.cs | 9 +- mcs/class/corlib/System/NumberFormatter.cs | 11 +- mcs/class/corlib/System/Random.cs | 145 ++-- mcs/class/corlib/System/String.cs | 14 +- mcs/class/corlib/System/TimeZone.cs | 12 +- mcs/class/corlib/System/Tuples.cs | 274 +++++-- .../corlib/Test/Microsoft.Win32/RegistryKeyTest.cs | 2 + .../Test/System.Collections.Generic/ListTest.cs | 110 ++- .../DebuggerDisplayAttributeTest.cs | 6 +- .../DebuggerTypeProxyAttribute.cs | 56 ++ .../Test/System.Diagnostics/StackFrameTest.cs | 10 +- .../Test/System.Globalization/CultureInfoTest.cs | 117 +++ .../System.Globalization/DateTimeFormatInfoTest.cs | 6 +- .../System.Globalization/NumberFormatInfoTest.cs | 57 ++ .../Test/System.Globalization/TextInfoTest.cs | 9 +- mcs/class/corlib/Test/System.IO/FileTest.cs | 48 ++ .../Test/System.Reflection.Emit/TypeBuilderTest.cs | 48 ++ .../Test/System.Reflection/AssemblyNameTest.cs | 4 +- .../Test/System.Reflection/ParameterInfoTest.cs | 31 +- .../TaskAwaiterTest.cs | 99 +++ .../WindowsIdentityTest.cs | 3 - .../corlib/Test/System.Text/UTF8EncodingTest.cs | 36 +- .../Test/System.Threading.Tasks/TaskFactoryTest.cs | 24 +- .../System.Threading.Tasks/TaskFactoryTest_T.cs | 26 + .../corlib/Test/System.Threading.Tasks/TaskTest.cs | 48 ++ .../Test/System.Threading/AutoResetEventTest.cs | 2 + .../CancellationTokenSourceTest.cs | 36 +- .../Test/System.Threading/ExecutionContextTest.cs | 68 ++ .../corlib/Test/System.Threading/ThreadPoolTest.cs | 33 +- .../corlib/Test/System.Threading/ThreadTest.cs | 7 + .../corlib/Test/System.Threading/TimerTest.cs | 7 +- .../corlib/Test/System/AggregateExceptionTests.cs | 11 + mcs/class/corlib/Test/System/AppDomainTest.cs | 101 ++- mcs/class/corlib/Test/System/ArraySegmentTest.cs | 18 + mcs/class/corlib/Test/System/ArrayTest.cs | 120 +++ mcs/class/corlib/Test/System/AttributeTest.cs | 15 + mcs/class/corlib/Test/System/DateTimeOffsetTest.cs | 2 +- mcs/class/corlib/Test/System/DateTimeTest.cs | 4 +- mcs/class/corlib/Test/System/EnumTest.cs | 7 +- .../corlib/Test/System/IntegerFormatterTest.cs | 10 +- mcs/class/corlib/Test/System/RandomTest.cs | 170 +++- mcs/class/corlib/Test/System/TimeZoneTest.cs | 68 ++ mcs/class/corlib/Test/System/TupleTest.cs | 63 ++ mcs/class/corlib/Test/System/TypeTest.cs | 19 + mcs/class/corlib/corlib.dll.sources | 12 + mcs/class/corlib/corlib_test.dll.sources | 3 + 206 files changed, 13777 insertions(+), 1111 deletions(-) create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.Concurrent/EnumerablePartitionerOptions.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyCollection`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyDictionary`2.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyList`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+KeyCollection.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+ValueCollection.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractOptionAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/AssemblyContentType.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/AssemblyMetadataAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/AssemblySignatureKeyAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/CustomAttributeExtensions.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/IReflectableType.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/IntrospectionExtensions.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/ReflectionContext.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/RuntimeReflectionExtensions.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Reflection/TypeInfo.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/IResourceReader.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/IResourceWriter.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/MissingManifestResourceException.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/NeutralResourcesLanguageAttribute.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/ResourceManager.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/ResourceReader.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/ResourceSet.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/ResourceWriter.xml mode change 100755 => 100644 mcs/class/corlib/Documentation/en/System.Resources/SatelliteContractVersionAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerFilePathAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerLineNumberAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerMemberNameAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ContractHelper.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ExtensionAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IAsyncStateMachine.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ICriticalNotifyCompletion.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/INotifyCompletion.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/StateMachineAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable+YieldAwaiter.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.InteropServices/TypeIdentifierAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesOptions.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Security.AccessControl/AccessRule`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Security.AccessControl/AuditRule`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Security.AccessControl/NativeObjectSecurity+ExceptionFromErrorCode.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Security.Policy/EvidenceBase.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.xml create mode 100644 mcs/class/corlib/Documentation/en/System.Threading/Volatile.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Action.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Action`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Action`2.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Action`3.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Action`4.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Func`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Func`2.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Func`3.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Func`4.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Func`5.xml create mode 100644 mcs/class/corlib/Documentation/en/System/IProgress`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System/InvalidTimeZoneException.xml create mode 100644 mcs/class/corlib/Documentation/en/System/Progress`1.xml create mode 100644 mcs/class/corlib/Documentation/en/System/TimeZoneInfo+AdjustmentRule.xml create mode 100644 mcs/class/corlib/Documentation/en/System/TimeZoneInfo+TransitionTime.xml create mode 100644 mcs/class/corlib/Documentation/en/System/TimeZoneInfo.xml create mode 100644 mcs/class/corlib/Documentation/en/System/TimeZoneNotFoundException.xml create mode 100644 mcs/class/corlib/Documentation/en/System/WeakReference`1.xml create mode 100644 mcs/class/corlib/Documentation/en/ns-System.Runtime.ExceptionServices.xml create mode 100644 mcs/class/corlib/Documentation/en/ns-System.Runtime.InteropServices.WindowsRuntime.xml create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs create mode 100644 mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs mode change 100644 => 100755 mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs create mode 100644 mcs/class/corlib/Test/System.Diagnostics/DebuggerTypeProxyAttribute.cs create mode 100644 mcs/class/corlib/Test/System.Globalization/NumberFormatInfoTest.cs create mode 100644 mcs/class/corlib/Test/System/TupleTest.cs (limited to 'mcs/class/corlib') diff --git a/mcs/class/corlib/Documentation/en/System.Collections.Concurrent/EnumerablePartitionerOptions.xml b/mcs/class/corlib/Documentation/en/System.Collections.Concurrent/EnumerablePartitionerOptions.xml new file mode 100644 index 0000000000..b91575013c --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.Concurrent/EnumerablePartitionerOptions.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Enum + + + + System.Flags + + + + To be added. + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Collections.Concurrent.EnumerablePartitionerOptions + + + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Collections.Concurrent.EnumerablePartitionerOptions + + + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyCollection`1.xml b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyCollection`1.xml new file mode 100644 index 0000000000..ed282726cc --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyCollection`1.xml @@ -0,0 +1,43 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Covariant + + + + + + System.Collections.Generic.IEnumerable<T> + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyDictionary`2.xml b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyDictionary`2.xml new file mode 100644 index 0000000000..b3f68e823d --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyDictionary`2.xml @@ -0,0 +1,122 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + + + System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + TValue + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<TKey> + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<TValue> + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyList`1.xml b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyList`1.xml new file mode 100644 index 0000000000..ebeeecb310 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.Generic/IReadOnlyList`1.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Covariant + + + + + + System.Collections.Generic.IEnumerable<T> + + + System.Collections.Generic.IReadOnlyCollection<T> + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + T + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+KeyCollection.xml b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+KeyCollection.xml new file mode 100644 index 0000000000..97114ee87a --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+KeyCollection.xml @@ -0,0 +1,255 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + + System.Object + + + + System.Collections.Generic.ICollection<TKey> + + + System.Collections.Generic.IEnumerable<TKey> + + + System.Collections.ICollection + + + + + System.Diagnostics.DebuggerDisplay("Count={Count}") + + + System.Diagnostics.DebuggerTypeProxy(typeof(System.Collections.Generic.CollectionDebuggerView`2)) + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerator<TKey> + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Object + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.IEnumerator + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+ValueCollection.xml b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+ValueCollection.xml new file mode 100644 index 0000000000..cac08361b0 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2+ValueCollection.xml @@ -0,0 +1,255 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + + System.Object + + + + System.Collections.Generic.ICollection<TValue> + + + System.Collections.Generic.IEnumerable<TValue> + + + System.Collections.ICollection + + + + + System.Diagnostics.DebuggerDisplay("Count={Count}") + + + System.Diagnostics.DebuggerTypeProxy(typeof(System.Collections.Generic.CollectionDebuggerView`2)) + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerator<TValue> + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Object + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.IEnumerator + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2.xml b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2.xml new file mode 100644 index 0000000000..25a0de8b34 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Collections.ObjectModel/ReadOnlyDictionary`2.xml @@ -0,0 +1,694 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + + System.Object + + + + System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + System.Collections.Generic.IDictionary<TKey,TValue> + + + System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + System.Collections.Generic.IReadOnlyDictionary<TKey,TValue> + + + System.Collections.IDictionary + + + + + System.Diagnostics.DebuggerDisplay("Count={Count}") + + + System.Diagnostics.DebuggerTypeProxy(typeof(System.Collections.Generic.CollectionDebuggerView`2)) + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IDictionary<TKey,TValue> + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey,TValue>> + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + TValue + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ObjectModel.ReadOnlyDictionary<TKey,TValue>+KeyCollection + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + TValue + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.ICollection<TKey> + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.ICollection<TValue> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<TKey> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<TValue> + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Object + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.IDictionaryEnumerator + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Object + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ICollection + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ICollection + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.IEnumerator + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ObjectModel.ReadOnlyDictionary<TKey,TValue>+ValueCollection + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.xml b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.xml new file mode 100644 index 0000000000..69068d3d77 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Method) + + + System.Diagnostics.Conditional("CONTRACTS_FULL") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.xml b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.xml new file mode 100644 index 0000000000..14f78529e9 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Method) + + + System.Diagnostics.Conditional("CONTRACTS_FULL") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractOptionAttribute.xml b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractOptionAttribute.xml new file mode 100644 index 0000000000..04f199f7f6 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Diagnostics.Contracts/ContractOptionAttribute.xml @@ -0,0 +1,130 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false) + + + System.Diagnostics.Conditional("CONTRACTS_FULL") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Globalization/CultureInfo.xml b/mcs/class/corlib/Documentation/en/System.Globalization/CultureInfo.xml index 06974c4677..83cd914f02 100755 --- a/mcs/class/corlib/Documentation/en/System.Globalization/CultureInfo.xml +++ b/mcs/class/corlib/Documentation/en/System.Globalization/CultureInfo.xml @@ -23,15 +23,9 @@ - Reserved for future use. + Represents locale information used by all culture dependendent types and methods. - - This class is - provided in order to implement the abstract methods that require it in the - reflection library. - - @@ -225,9 +219,9 @@ System.Globalization.CultureInfo - To be added. - To be added. - To be added. + CultureInfo that represents the culture used by the current thread. + + Initial value for each thread is determined using following rules. When is set its value is used otherwise the framework uses method to map system locate to framework culture name. This operation may fail in rare cases when system locale is set to invalid value or to value which cannot be translated to framework culture name. In such case values is used. 1.0.5000.0 diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyContentType.xml b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyContentType.xml new file mode 100644 index 0000000000..447c8fc8d6 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyContentType.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Enum + + + + System.Runtime.InteropServices.ComVisible(false) + + + + To be added. + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Reflection.AssemblyContentType + + + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Reflection.AssemblyContentType + + + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyMetadataAttribute.xml b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyMetadataAttribute.xml new file mode 100644 index 0000000000..85085c7e14 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblyMetadataAttribute.xml @@ -0,0 +1,73 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/AssemblySignatureKeyAttribute.xml b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblySignatureKeyAttribute.xml new file mode 100644 index 0000000000..08a2ea1156 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/AssemblySignatureKeyAttribute.xml @@ -0,0 +1,73 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/CustomAttributeExtensions.xml b/mcs/class/corlib/Documentation/en/System.Reflection/CustomAttributeExtensions.xml new file mode 100644 index 0000000000..df30bdc794 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/CustomAttributeExtensions.xml @@ -0,0 +1,894 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + System.Attribute + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Attribute> + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<T> + + + + + System.Attribute + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/IReflectableType.xml b/mcs/class/corlib/Documentation/en/System.Reflection/IReflectableType.xml new file mode 100644 index 0000000000..9d0d54a250 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/IReflectableType.xml @@ -0,0 +1,32 @@ + + + + + mscorlib + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/IntrospectionExtensions.xml b/mcs/class/corlib/Documentation/en/System.Reflection/IntrospectionExtensions.xml new file mode 100644 index 0000000000..086213e937 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/IntrospectionExtensions.xml @@ -0,0 +1,38 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/ReflectionContext.xml b/mcs/class/corlib/Documentation/en/System.Reflection/ReflectionContext.xml new file mode 100644 index 0000000000..1eb15f39cc --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/ReflectionContext.xml @@ -0,0 +1,91 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.Assembly + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/RuntimeReflectionExtensions.xml b/mcs/class/corlib/Documentation/en/System.Reflection/RuntimeReflectionExtensions.xml new file mode 100644 index 0000000000..56c915223a --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/RuntimeReflectionExtensions.xml @@ -0,0 +1,250 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.MethodInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.MethodInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.EventInfo + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.EventInfo> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.FieldInfo + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.FieldInfo> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.InterfaceMapping + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.MethodInfo + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.PropertyInfo> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.PropertyInfo + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Reflection/TypeInfo.xml b/mcs/class/corlib/Documentation/en/System.Reflection/TypeInfo.xml new file mode 100644 index 0000000000..544492276f --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Reflection/TypeInfo.xml @@ -0,0 +1,340 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Type + + + + System.Reflection.IReflectableType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Type + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.EventInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.FieldInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.MemberInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.PropertyInfo> + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Type[] + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.EventInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.FieldInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.MethodInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Reflection.MethodInfo> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.PropertyInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.Type> + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Reflection.TypeInfo + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Resources/IResourceReader.xml b/mcs/class/corlib/Documentation/en/System.Resources/IResourceReader.xml old mode 100755 new mode 100644 index 5c66441470..70cc31eacc --- a/mcs/class/corlib/Documentation/en/System.Resources/IResourceReader.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/IResourceReader.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -8,6 +9,19 @@ 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. + + + System.Collections.IEnumerable + + + System.IDisposable + + + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -15,7 +29,13 @@ + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Void @@ -24,15 +44,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Collections.IDictionaryEnumerator @@ -42,24 +63,6 @@ To be added: an object of type 'Collections.IDictionaryEnumerator' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - - - - System.Collections.IEnumerable - - - System.IDisposable - - - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/IResourceWriter.xml b/mcs/class/corlib/Documentation/en/System.Resources/IResourceWriter.xml old mode 100755 new mode 100644 index d38cb9ef01..352523d454 --- a/mcs/class/corlib/Documentation/en/System.Resources/IResourceWriter.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/IResourceWriter.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -8,6 +9,16 @@ 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. + + + System.IDisposable + + + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -15,7 +26,13 @@ + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Void @@ -29,15 +46,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -51,15 +69,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -73,15 +92,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -90,15 +110,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -107,21 +128,6 @@ To be added To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - - - - System.IDisposable - - - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/MissingManifestResourceException.xml b/mcs/class/corlib/Documentation/en/System.Resources/MissingManifestResourceException.xml old mode 100755 new mode 100644 index 9fd233ac49..62d475cda9 --- a/mcs/class/corlib/Documentation/en/System.Resources/MissingManifestResourceException.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/MissingManifestResourceException.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -13,6 +14,11 @@ + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -20,22 +26,29 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -45,15 +58,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -65,15 +79,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -85,16 +100,6 @@ To be added To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/MissingSatelliteAssemblyException.xml b/mcs/class/corlib/Documentation/en/System.Resources/MissingSatelliteAssemblyException.xml index a1c6e2e254..4ccea6a8f9 100644 --- a/mcs/class/corlib/Documentation/en/System.Resources/MissingSatelliteAssemblyException.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/MissingSatelliteAssemblyException.xml @@ -1,5 +1,6 @@ + mscorlib @@ -25,27 +26,30 @@ + Constructor - + 2.0.0.0 - + 4.0.0.0 + To be added. To be added. - + 2.0.0.0 - 4.0.0.0 - + + Constructor - + 2.0.0.0 - + 4.0.0.0 + @@ -55,17 +59,18 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + + Constructor - + 2.0.0.0 - + 4.0.0.0 + @@ -77,17 +82,18 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + + Constructor - + 2.0.0.0 - + 4.0.0.0 + @@ -99,17 +105,18 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + + Constructor - + 2.0.0.0 - + 4.0.0.0 + @@ -121,17 +128,18 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + + Property - + 2.0.0.0 - + 4.0.0.0 + System.String @@ -141,10 +149,9 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + diff --git a/mcs/class/corlib/Documentation/en/System.Resources/NeutralResourcesLanguageAttribute.xml b/mcs/class/corlib/Documentation/en/System.Resources/NeutralResourcesLanguageAttribute.xml old mode 100755 new mode 100644 index 50c193eab1..4e6d859e16 --- a/mcs/class/corlib/Documentation/en/System.Resources/NeutralResourcesLanguageAttribute.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/NeutralResourcesLanguageAttribute.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -27,7 +28,13 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + @@ -37,15 +44,15 @@ To be added To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - + Constructor + + 2.0.0.0 + 4.0.0.0 + @@ -57,14 +64,16 @@ To be added. - - 2.0.0.0 - 4.0.0.0 - + Property + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.String @@ -73,15 +82,15 @@ To be added: an object of type 'string' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - + Property + + 2.0.0.0 + 4.0.0.0 + System.Resources.UltimateResourceFallbackLocation @@ -91,10 +100,6 @@ To be added. - - 2.0.0.0 - 4.0.0.0 - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/ResourceManager.xml b/mcs/class/corlib/Documentation/en/System.Resources/ResourceManager.xml old mode 100755 new mode 100644 index 23a789ff83..33a5dd36f5 --- a/mcs/class/corlib/Documentation/en/System.Resources/ResourceManager.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/ResourceManager.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -12,6 +13,11 @@ System.Object + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -19,22 +25,29 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -44,15 +57,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -64,15 +78,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -86,15 +101,16 @@ To be added To be added + + + + + Property 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Property System.String @@ -103,15 +119,16 @@ To be added: an object of type 'string' To be added + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.String @@ -120,15 +137,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Resources.ResourceManager @@ -145,15 +163,15 @@ To be added: an object of type 'ResourceManager' To be added + + + + + Property - 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Property System.Resources.UltimateResourceFallbackLocation @@ -163,14 +181,16 @@ To be added. - - 2.0.0.0 - 4.0.0.0 - + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Globalization.CultureInfo @@ -183,15 +203,16 @@ To be added: an object of type 'Globalization.CultureInfo' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Object @@ -204,15 +225,16 @@ To be added: an object of type 'object' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Object @@ -227,15 +249,16 @@ To be added: an object of type 'object' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.String @@ -248,15 +271,16 @@ To be added: an object of type 'string' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Resources.ResourceSet @@ -273,15 +297,16 @@ To be added: an object of type 'ResourceSet' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Version @@ -294,15 +319,20 @@ To be added: an object of type 'Version' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - + Method + + 2.0.0.0 + 4.0.0.0 + + + + System.Runtime.InteropServices.ComVisible(false) + + System.IO.UnmanagedMemoryStream @@ -316,22 +346,20 @@ To be added. + + + + + Method 2.0.0.0 4.0.0.0 - - System.CLSCompliant(false) - System.Runtime.InteropServices.ComVisible(false) - - - - Method System.IO.UnmanagedMemoryStream @@ -347,22 +375,16 @@ To be added. - - 2.0.0.0 - 4.0.0.0 - - - - System.CLSCompliant(false) - - - System.Runtime.InteropServices.ComVisible(false) - - + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.String @@ -375,15 +397,16 @@ To be added: an object of type 'string' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.String @@ -398,33 +421,35 @@ To be added: an object of type 'string' To be added + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.Int32 + 1 To be added To be added - 1 + + + + + Property 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Property System.Boolean @@ -435,15 +460,16 @@ To be added: an object of type 'bool' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Resources.ResourceSet @@ -460,33 +486,35 @@ To be added: an object of type 'ResourceSet' To be added + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.Int32 + -1091581234 To be added To be added - -1091581234 + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.Reflection.Assembly @@ -495,15 +523,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -512,15 +541,21 @@ To be added To be added + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field + + + System.Obsolete("Use InternalGetResourceSet instead.") + + System.Collections.Hashtable @@ -529,15 +564,16 @@ To be added To be added + + + + + Property 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Property System.Type @@ -546,16 +582,6 @@ To be added: an object of type 'Type' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/ResourceReader.xml b/mcs/class/corlib/Documentation/en/System.Resources/ResourceReader.xml old mode 100755 new mode 100644 index 7770f7e8a8..02301a773e --- a/mcs/class/corlib/Documentation/en/System.Resources/ResourceReader.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/ResourceReader.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -16,6 +17,11 @@ System.Resources.IResourceReader + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -23,7 +29,13 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + @@ -33,15 +45,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -51,15 +64,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -68,15 +82,32 @@ To be added To be added + + + + + Method - 1.0.5000.0 - 2.0.0.0 4.0.0.0 + + System.Void + + + + To be added. + To be added. + + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Collections.IDictionaryEnumerator @@ -86,14 +117,10 @@ To be added: an object of type 'Collections.IDictionaryEnumerator' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - + Method 2.0.0.0 @@ -117,7 +144,13 @@ + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Collections.IEnumerator @@ -127,11 +160,6 @@ To be added. To be added. - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - @@ -147,13 +175,7 @@ 1.0.5000.0 2.0.0.0 - 4.0.0.0 - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/ResourceSet.xml b/mcs/class/corlib/Documentation/en/System.Resources/ResourceSet.xml old mode 100755 new mode 100644 index 237f1fc08f..3369e593d8 --- a/mcs/class/corlib/Documentation/en/System.Resources/ResourceSet.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/ResourceSet.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -19,6 +20,11 @@ System.IDisposable + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -26,22 +32,29 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -51,15 +64,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -69,15 +83,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -87,15 +102,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -104,15 +120,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -121,15 +138,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -141,15 +159,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Type @@ -159,15 +178,16 @@ To be added: an object of type 'Type' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Type @@ -177,15 +197,21 @@ To be added: an object of type 'Type' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method + + + System.Runtime.InteropServices.ComVisible(false) + + System.Collections.IDictionaryEnumerator @@ -195,20 +221,16 @@ To be added. To be added. + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - System.Runtime.InteropServices.ComVisible(false) - - - - - - Method System.Object @@ -221,15 +243,16 @@ To be added: an object of type 'object' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Object @@ -244,15 +267,16 @@ To be added: an object of type 'object' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.String @@ -265,15 +289,16 @@ To be added: an object of type 'string' To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.String @@ -288,15 +313,16 @@ To be added: an object of type 'string' To be added + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.Resources.IResourceReader @@ -305,15 +331,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -322,15 +349,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Collections.IEnumerator @@ -340,15 +368,16 @@ To be added. To be added. + + + + + Field 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Field System.Collections.Hashtable @@ -357,16 +386,6 @@ To be added To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/ResourceWriter.xml b/mcs/class/corlib/Documentation/en/System.Resources/ResourceWriter.xml old mode 100755 new mode 100644 index 8eed6453ae..d1f409f479 --- a/mcs/class/corlib/Documentation/en/System.Resources/ResourceWriter.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/ResourceWriter.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -16,6 +17,11 @@ System.Resources.IResourceWriter + + + System.Runtime.InteropServices.ComVisible(true) + + To be added To be added @@ -23,7 +29,13 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + @@ -33,15 +45,16 @@ To be added To be added + + + + + Constructor 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Constructor @@ -51,15 +64,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -73,15 +87,37 @@ To be added To be added + + + + + Method - 1.0.5000.0 - 2.0.0.0 4.0.0.0 + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Void @@ -95,15 +131,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -117,15 +154,38 @@ To be added To be added + + + + + Method - 1.0.5000.0 - 2.0.0.0 4.0.0.0 + + System.Void + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + Method + + 2.0.0.0 + 4.0.0.0 + System.Void @@ -142,14 +202,16 @@ To be added. - - 2.0.0.0 - 4.0.0.0 - + Method + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + System.Void @@ -158,15 +220,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -175,15 +238,16 @@ To be added To be added + + + + + Method 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Method System.Void @@ -192,16 +256,22 @@ To be added To be added + + + + + Property - 1.0.5000.0 - 2.0.0.0 4.0.0.0 + + System.Func<System.Type,System.String> + + + To be added. + To be added. + To be added. + - - - System.Runtime.InteropServices.ComVisible(true) - - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/SatelliteContractVersionAttribute.xml b/mcs/class/corlib/Documentation/en/System.Resources/SatelliteContractVersionAttribute.xml old mode 100755 new mode 100644 index 2e215118a4..0d4d7ff664 --- a/mcs/class/corlib/Documentation/en/System.Resources/SatelliteContractVersionAttribute.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/SatelliteContractVersionAttribute.xml @@ -1,5 +1,6 @@ + mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] @@ -27,7 +28,13 @@ + Constructor + + 1.0.5000.0 + 2.0.0.0 + 4.0.0.0 + @@ -37,15 +44,16 @@ To be added To be added + + + + + Property 1.0.5000.0 2.0.0.0 4.0.0.0 - - - - Property System.String @@ -54,11 +62,6 @@ To be added: an object of type 'string' To be added - - 1.0.5000.0 - 2.0.0.0 - 4.0.0.0 - diff --git a/mcs/class/corlib/Documentation/en/System.Resources/UltimateResourceFallbackLocation.xml b/mcs/class/corlib/Documentation/en/System.Resources/UltimateResourceFallbackLocation.xml index f736538262..6331921f7a 100644 --- a/mcs/class/corlib/Documentation/en/System.Resources/UltimateResourceFallbackLocation.xml +++ b/mcs/class/corlib/Documentation/en/System.Resources/UltimateResourceFallbackLocation.xml @@ -1,5 +1,6 @@ + mscorlib @@ -24,10 +25,12 @@ + Field - + 2.0.0.0 - + 4.0.0.0 + System.Resources.UltimateResourceFallbackLocation @@ -35,17 +38,18 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + + Field - + 2.0.0.0 - + 4.0.0.0 + System.Resources.UltimateResourceFallbackLocation @@ -53,10 +57,9 @@ To be added. - + 2.0.0.0 - 4.0.0.0 - + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml new file mode 100644 index 0000000000..b376842151 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Runtime.CompilerServices.StateMachineAttribute + + + + + System.AttributeUsage(System.AttributeTargets.Method, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.xml new file mode 100644 index 0000000000..247f1ef315 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.xml @@ -0,0 +1,202 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.INotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.AsyncTaskMethodBuilder + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Threading.Tasks.Task + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder`1.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder`1.xml new file mode 100644 index 0000000000..c4b9641430 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncTaskMethodBuilder`1.xml @@ -0,0 +1,209 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + System.ValueType + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.INotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.AsyncTaskMethodBuilder<TResult> + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Threading.Tasks.Task<TResult> + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.xml new file mode 100644 index 0000000000..d1ce6722b4 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.xml @@ -0,0 +1,186 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.INotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.AsyncVoidMethodBuilder + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + System.Runtime.CompilerServices.IAsyncStateMachine + + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerFilePathAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerFilePathAttribute.xml new file mode 100644 index 0000000000..b41082db6a --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerFilePathAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerLineNumberAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerLineNumberAttribute.xml new file mode 100644 index 0000000000..3d093b5ebf --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerLineNumberAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerMemberNameAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerMemberNameAttribute.xml new file mode 100644 index 0000000000..0b2ff16fc6 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/CallerMemberNameAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Parameter, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.xml new file mode 100644 index 0000000000..e8aa09c0bc --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.xml @@ -0,0 +1,92 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.xml new file mode 100644 index 0000000000..d2d24eca0d --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.xml @@ -0,0 +1,35 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.xml new file mode 100644 index 0000000000..8f96a7c9b0 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter.xml @@ -0,0 +1,96 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + System.ValueType + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + TResult + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1.xml new file mode 100644 index 0000000000..f3efb097bf --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ConfiguredTaskAwaitable`1.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + System.ValueType + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult>+ConfiguredTaskAwaiter + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ContractHelper.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ContractHelper.xml new file mode 100644 index 0000000000..b5a4843cd9 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ContractHelper.xml @@ -0,0 +1,87 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Diagnostics.DebuggerNonUserCode + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail) + + + + System.String + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Diagnostics.DebuggerNonUserCode + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ExtensionAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ExtensionAttribute.xml new file mode 100644 index 0000000000..a7ae4989c8 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ExtensionAttribute.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method | System.AttributeTargets.All) + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IAsyncStateMachine.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IAsyncStateMachine.xml new file mode 100644 index 0000000000..55427a9848 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IAsyncStateMachine.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ICriticalNotifyCompletion.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ICriticalNotifyCompletion.xml new file mode 100644 index 0000000000..435028af95 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/ICriticalNotifyCompletion.xml @@ -0,0 +1,38 @@ + + + + + mscorlib + 4.0.0.0 + + + + System.Runtime.CompilerServices.INotifyCompletion + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/INotifyCompletion.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/INotifyCompletion.xml new file mode 100644 index 0000000000..91d189cf17 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/INotifyCompletion.xml @@ -0,0 +1,34 @@ + + + + + mscorlib + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml new file mode 100644 index 0000000000..17489b3c86 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml @@ -0,0 +1,39 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Runtime.CompilerServices.StateMachineAttribute + + + + + System.AttributeUsage(System.AttributeTargets.Method, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/StateMachineAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/StateMachineAttribute.xml new file mode 100644 index 0000000000..1cabaa43d4 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/StateMachineAttribute.xml @@ -0,0 +1,55 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Method, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Type + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter.xml new file mode 100644 index 0000000000..aa09dfd6fb --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter.xml @@ -0,0 +1,92 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter`1.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter`1.xml new file mode 100644 index 0000000000..b8cb3fab6e --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/TaskAwaiter`1.xml @@ -0,0 +1,97 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + System.ValueType + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + TResult + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable+YieldAwaiter.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable+YieldAwaiter.xml new file mode 100644 index 0000000000..25997da82c --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable+YieldAwaiter.xml @@ -0,0 +1,92 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + System.Runtime.CompilerServices.ICriticalNotifyCompletion + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable.xml b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable.xml new file mode 100644 index 0000000000..f530f2da80 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.CompilerServices/YieldAwaitable.xml @@ -0,0 +1,35 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.CompilerServices.YieldAwaitable+YieldAwaiter + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml new file mode 100644 index 0000000000..b9c6c5b0e7 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml @@ -0,0 +1,70 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.ExceptionServices.ExceptionDispatchInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Exception + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.xml b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.xml new file mode 100644 index 0000000000..13255cbf46 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + System.EventArgs + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Exception + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.xml new file mode 100644 index 0000000000..cdd9c582a3 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.xml new file mode 100644 index 0000000000..099591248f --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.xml @@ -0,0 +1,55 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface | System.AttributeTargets.All, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Type + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.xml new file mode 100644 index 0000000000..ffba507e8f --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.xml @@ -0,0 +1,71 @@ + + + + + mscorlib + 4.0.0.0 + + + System.EventArgs + + + + + System.Runtime.InteropServices.ComVisible(false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ObjectModel.Collection<System.String> + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.xml new file mode 100644 index 0000000000..9de2223b64 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.xml @@ -0,0 +1,99 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Int32 + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml new file mode 100644 index 0000000000..a134e71e30 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml @@ -0,0 +1,133 @@ + + + + + mscorlib + 4.0.0.0 + + + + + ReferenceTypeConstraint + + + + + System.Object + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T> + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + T + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.xml new file mode 100644 index 0000000000..18cabc5fa2 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.xml @@ -0,0 +1,37 @@ + + + + + mscorlib + 4.0.0.0 + + + + + System.Runtime.InteropServices.Guid("00000035-0000-0000-C000-000000000046") + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.xml new file mode 100644 index 0000000000..fdcdd49257 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.xml @@ -0,0 +1,127 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface | System.AttributeTargets.All, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Byte + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Type + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Byte + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Byte + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Byte + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.xml new file mode 100644 index 0000000000..e12494b07e --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.xml @@ -0,0 +1,89 @@ + + + + + mscorlib + 4.0.0.0 + + + System.EventArgs + + + + + System.Runtime.InteropServices.ComVisible(false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Reflection.Assembly + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Collections.ObjectModel.Collection<System.Reflection.Assembly> + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.xml new file mode 100644 index 0000000000..883f167f02 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Parameter, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.xml new file mode 100644 index 0000000000..9f8ff6d391 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.xml @@ -0,0 +1,55 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.ReturnValue | System.AttributeTargets.All, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml new file mode 100644 index 0000000000..9578d1164f --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml @@ -0,0 +1,168 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Runtime.InteropServices.WindowsRuntime.IActivationFactory + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.String + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.IntPtr + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml new file mode 100644 index 0000000000..9af7039291 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml @@ -0,0 +1,94 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Event + + 4.0.0.0 + + + System.EventHandler<System.Runtime.InteropServices.WindowsRuntime.DesignerNamespaceResolveEventArgs> + + + To be added. + To be added. + + + + + + Event + + 4.0.0.0 + + + System.EventHandler<System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs> + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.Generic.IEnumerable<System.String> + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.xml new file mode 100644 index 0000000000..e6076bfa66 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.xml @@ -0,0 +1,36 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Parameter, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices/TypeIdentifierAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices/TypeIdentifierAttribute.xml new file mode 100644 index 0000000000..d869f93780 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.InteropServices/TypeIdentifierAttribute.xml @@ -0,0 +1,86 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Delegate | System.AttributeTargets.All, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml b/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml new file mode 100644 index 0000000000..1fbef76eb2 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml @@ -0,0 +1,55 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Attribute + + + + + System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Module | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Enum | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Event | System.AttributeTargets.Interface | System.AttributeTargets.Delegate | System.AttributeTargets.All, AllowMultiple=false, Inherited=false) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Runtime.Versioning.ComponentGuaranteesOptions + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesOptions.xml b/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesOptions.xml new file mode 100644 index 0000000000..b98d1f994d --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Runtime.Versioning/ComponentGuaranteesOptions.xml @@ -0,0 +1,78 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Enum + + + + System.Flags + + + + To be added. + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Runtime.Versioning.ComponentGuaranteesOptions + + + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Runtime.Versioning.ComponentGuaranteesOptions + + + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Runtime.Versioning.ComponentGuaranteesOptions + + + To be added. + + + + + + Field + + 4.0.0.0 + + + System.Runtime.Versioning.ComponentGuaranteesOptions + + + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AccessRule`1.xml b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AccessRule`1.xml new file mode 100644 index 0000000000..ad670e8a15 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AccessRule`1.xml @@ -0,0 +1,132 @@ + + + + + mscorlib + 4.0.0.0 + + + + + DefaultConstructorConstraint + NotNullableValueTypeConstraint + System.ValueType + + + + + System.Security.AccessControl.AccessRule + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + T + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AuditRule`1.xml b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AuditRule`1.xml new file mode 100644 index 0000000000..546dbbc24c --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/AuditRule`1.xml @@ -0,0 +1,132 @@ + + + + + mscorlib + 4.0.0.0 + + + + + DefaultConstructorConstraint + NotNullableValueTypeConstraint + System.ValueType + + + + + System.Security.AccessControl.AuditRule + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + T + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Security.AccessControl/NativeObjectSecurity+ExceptionFromErrorCode.xml b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/NativeObjectSecurity+ExceptionFromErrorCode.xml new file mode 100644 index 0000000000..0f3f7030a6 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Security.AccessControl/NativeObjectSecurity+ExceptionFromErrorCode.xml @@ -0,0 +1,29 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Delegate + + + + + + + + + System.Exception + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System.Security.Policy/EvidenceBase.xml b/mcs/class/corlib/Documentation/en/System.Security.Policy/EvidenceBase.xml new file mode 100644 index 0000000000..ac132830eb --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Security.Policy/EvidenceBase.xml @@ -0,0 +1,48 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Security.Policy.EvidenceBase + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.xml b/mcs/class/corlib/Documentation/en/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.xml new file mode 100644 index 0000000000..4dbe8c6e9c --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.xml @@ -0,0 +1,157 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + + System.Diagnostics.DebuggerDisplay("Concurrent={ConcurrentTaskCount}, Exclusive={ExclusiveTaskCount}") + + + System.Diagnostics.DebuggerTypeProxy(typeof(System.Threading.Tasks.ConcurrentExclusiveSchedulerPair/SchedulerDebuggerView)) + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Threading.Tasks.Task + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Threading.Tasks.TaskScheduler + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Threading.Tasks.TaskScheduler + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System.Threading/Volatile.xml b/mcs/class/corlib/Documentation/en/System.Threading/Volatile.xml new file mode 100644 index 0000000000..44357a0532 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System.Threading/Volatile.xml @@ -0,0 +1,768 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Byte + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Double + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Int16 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Int32 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Int64 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.IntPtr + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.SByte + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Single + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.UInt16 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.UInt32 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.UInt64 + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.UIntPtr + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + T + + + + + ReferenceTypeConstraint + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + + System.CLSCompliant(false) + + + System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success) + + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + ReferenceTypeConstraint + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/Action.xml b/mcs/class/corlib/Documentation/en/System/Action.xml new file mode 100644 index 0000000000..17bdf90e35 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Action.xml @@ -0,0 +1,24 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + System.Void + + + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Action`1.xml b/mcs/class/corlib/Documentation/en/System/Action`1.xml new file mode 100644 index 0000000000..360e85b1a3 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Action`1.xml @@ -0,0 +1,30 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + System.Delegate + + + + + + System.Void + + + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Action`2.xml b/mcs/class/corlib/Documentation/en/System/Action`2.xml new file mode 100644 index 0000000000..a1acfbdbcc --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Action`2.xml @@ -0,0 +1,43 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + System.Void + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Action`3.xml b/mcs/class/corlib/Documentation/en/System/Action`3.xml new file mode 100644 index 0000000000..4e7838366a --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Action`3.xml @@ -0,0 +1,51 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + + System.Void + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Action`4.xml b/mcs/class/corlib/Documentation/en/System/Action`4.xml new file mode 100644 index 0000000000..ca3737f0f0 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Action`4.xml @@ -0,0 +1,59 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + + + System.Void + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Func`1.xml b/mcs/class/corlib/Documentation/en/System/Func`1.xml new file mode 100644 index 0000000000..7a165d78ef --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Func`1.xml @@ -0,0 +1,33 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Covariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + TResult + + + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Func`2.xml b/mcs/class/corlib/Documentation/en/System/Func`2.xml new file mode 100644 index 0000000000..a0b9e2e878 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Func`2.xml @@ -0,0 +1,42 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Covariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + TResult + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Func`3.xml b/mcs/class/corlib/Documentation/en/System/Func`3.xml new file mode 100644 index 0000000000..3bfc4171fb --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Func`3.xml @@ -0,0 +1,50 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + Covariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + TResult + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Func`4.xml b/mcs/class/corlib/Documentation/en/System/Func`4.xml new file mode 100644 index 0000000000..e3880c1e5d --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Func`4.xml @@ -0,0 +1,58 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + Covariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + + TResult + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/Func`5.xml b/mcs/class/corlib/Documentation/en/System/Func`5.xml new file mode 100644 index 0000000000..b7bcae05b6 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Func`5.xml @@ -0,0 +1,66 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + Contravariant + + + + + Covariant + + + + + System.Delegate + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + + + + + + + TResult + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/System/IProgress`1.xml b/mcs/class/corlib/Documentation/en/System/IProgress`1.xml new file mode 100644 index 0000000000..c7a409c27d --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/IProgress`1.xml @@ -0,0 +1,42 @@ + + + + + mscorlib + 4.0.0.0 + + + + + Contravariant + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/InvalidTimeZoneException.xml b/mcs/class/corlib/Documentation/en/System/InvalidTimeZoneException.xml new file mode 100644 index 0000000000..cd8dc67a45 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/InvalidTimeZoneException.xml @@ -0,0 +1,88 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Exception + + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/Progress`1.xml b/mcs/class/corlib/Documentation/en/System/Progress`1.xml new file mode 100644 index 0000000000..f885c5ee39 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/Progress`1.xml @@ -0,0 +1,108 @@ + + + + + mscorlib + 4.0.0.0 + + + + + + System.Object + + + + System.IProgress<T> + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Event + + 4.0.0.0 + + + System.EventHandler<T> + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+AdjustmentRule.xml b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+AdjustmentRule.xml new file mode 100644 index 0000000000..dce8632faa --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+AdjustmentRule.xml @@ -0,0 +1,218 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + System.IEquatable<System.TimeZoneInfo+AdjustmentRule> + + + System.Runtime.Serialization.IDeserializationCallback + + + System.Runtime.Serialization.ISerializable + + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo+AdjustmentRule + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeSpan + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeZoneInfo+TransitionTime + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeZoneInfo+TransitionTime + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Int32 + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+TransitionTime.xml b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+TransitionTime.xml new file mode 100644 index 0000000000..8b891c0b11 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo+TransitionTime.xml @@ -0,0 +1,320 @@ + + + + + mscorlib + 4.0.0.0 + + + System.ValueType + + + + System.IEquatable<System.TimeZoneInfo+TransitionTime> + + + System.Runtime.Serialization.IDeserializationCallback + + + System.Runtime.Serialization.ISerializable + + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo+TransitionTime + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo+TransitionTime + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.DayOfWeek + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Int32 + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.DateTime + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Int32 + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/TimeZoneInfo.xml b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo.xml new file mode 100644 index 0000000000..c850baa866 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/TimeZoneInfo.xml @@ -0,0 +1,870 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Object + + + + System.IEquatable<System.TimeZoneInfo> + + + System.Runtime.Serialization.IDeserializationCallback + + + System.Runtime.Serialization.ISerializable + + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeSpan + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTimeOffset + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTimeOffset + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.DateTime + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo + + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo + + + + + + + + + + + + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeZoneInfo+AdjustmentRule[] + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeSpan[] + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeSpan[] + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Int32 + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Collections.ObjectModel.ReadOnlyCollection<System.TimeZoneInfo> + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeSpan + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.TimeSpan + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeZoneInfo + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.String + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.Boolean + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.String + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.String + + + + To be added. + To be added. + To be added. + + + + + + Property + + 4.0.0.0 + + + System.TimeZoneInfo + + + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/TimeZoneNotFoundException.xml b/mcs/class/corlib/Documentation/en/System/TimeZoneNotFoundException.xml new file mode 100644 index 0000000000..c42ff93059 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/TimeZoneNotFoundException.xml @@ -0,0 +1,88 @@ + + + + + mscorlib + 4.0.0.0 + + + System.Exception + + + + + System.Runtime.CompilerServices.TypeForwardedFrom("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/System/WeakReference`1.xml b/mcs/class/corlib/Documentation/en/System/WeakReference`1.xml new file mode 100644 index 0000000000..4089d8a1a4 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/System/WeakReference`1.xml @@ -0,0 +1,140 @@ + + + + + mscorlib + 4.0.0.0 + + + + + ReferenceTypeConstraint + + + + + System.Object + + + + System.Runtime.Serialization.ISerializable + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + To be added. + To be added. + To be added. + + + + + + Constructor + + 4.0.0.0 + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + + To be added. + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Void + + + + + + To be added. + To be added. + To be added. + + + + + + Method + + 4.0.0.0 + + + System.Boolean + + + + + + To be added. + To be added. + To be added. + To be added. + + + + diff --git a/mcs/class/corlib/Documentation/en/ns-System.Runtime.ExceptionServices.xml b/mcs/class/corlib/Documentation/en/ns-System.Runtime.ExceptionServices.xml new file mode 100644 index 0000000000..26593774d9 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/ns-System.Runtime.ExceptionServices.xml @@ -0,0 +1,6 @@ + + + To be added. + To be added. + + diff --git a/mcs/class/corlib/Documentation/en/ns-System.Runtime.InteropServices.WindowsRuntime.xml b/mcs/class/corlib/Documentation/en/ns-System.Runtime.InteropServices.WindowsRuntime.xml new file mode 100644 index 0000000000..206703d275 --- /dev/null +++ b/mcs/class/corlib/Documentation/en/ns-System.Runtime.InteropServices.WindowsRuntime.xml @@ -0,0 +1,6 @@ + + + To be added. + To be added. + + diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index 0cf61b786f..3000f81971 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -106,8 +106,8 @@ $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE): %.resources: %.resx TEST_RESOURCES = $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE) -satellite_assembly1 = es-ES/$(patsubst %.dll,%.Resources.dll,$(test_lib)) -satellite_assembly2 = nn-NO/$(patsubst %.dll,%.Resources.dll,$(test_lib)) +satellite_assembly1 = es-ES/$(patsubst %.dll,%.resources.dll,$(test_lib)) +satellite_assembly2 = nn-NO/$(patsubst %.dll,%.resources.dll,$(test_lib)) $(test_lib): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2) @@ -140,7 +140,9 @@ $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/Bina $(vtsdir)/BinarySerializationOverVersions.cs -out:$@ @cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib -# Need to define MONO_PATH to an absolute dir since the test is ran from a subdir +# Need to define TEST_MONO_PATH to an absolute dir since the test is ran from a subdir +TEST_MONO_PATH=$(PWD)/../lib/$(PROFILE) + run-test-vts: test-vts @echo Running vts tests... PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \ diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs index bb8e99f704..a52ced14f8 100644 --- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs +++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs @@ -35,6 +35,7 @@ namespace System.Collections.Concurrent { [DebuggerDisplay ("Count={Count}")] [DebuggerTypeProxy (typeof (CollectionDebuggerView<,>))] + [Serializable] public class ConcurrentDictionary : IDictionary, ICollection>, IEnumerable>, IDictionary, ICollection, IEnumerable diff --git a/mcs/class/corlib/System.Collections.Generic/List.cs b/mcs/class/corlib/System.Collections.Generic/List.cs index 17056a1b21..840984f04f 100644 --- a/mcs/class/corlib/System.Collections.Generic/List.cs +++ b/mcs/class/corlib/System.Collections.Generic/List.cs @@ -69,7 +69,7 @@ namespace System.Collections.Generic { AddEnumerable (collection); } else { _size = c.Count; - _items = new T [Math.Max (_size, DefaultCapacity)]; + _items = new T [_size]; c.CopyTo (_items, 0); } } @@ -116,6 +116,18 @@ namespace System.Collections.Generic { throw new ArgumentException ("index and count exceed length of list"); } + void CheckRangeOutOfRange (int idx, int count) + { + if (idx < 0) + throw new ArgumentOutOfRangeException ("index"); + + if (count < 0) + throw new ArgumentOutOfRangeException ("count"); + + if ((uint) idx + (uint) count > (uint) _size) + throw new ArgumentOutOfRangeException ("index and count exceed length of list"); + } + void AddCollection (ICollection collection) { int collectionCount = collection.Count; @@ -212,14 +224,27 @@ namespace System.Collections.Generic { public bool Exists (Predicate match) { CheckMatch(match); - return GetIndex(0, _size, match) != -1; + + for (int i = 0; i < _size; i++) { + var item = _items [i]; + if (match (item)) + return true; + } + + return false; } public T Find (Predicate match) { CheckMatch(match); - int i = GetIndex(0, _size, match); - return (i != -1) ? _items [i] : default (T); + + for (int i = 0; i < _size; i++) { + var item = _items [i]; + if (match (item)) + return item; + } + + return default (T); } static void CheckMatch (Predicate match) @@ -296,68 +321,56 @@ namespace System.Collections.Generic { public int FindIndex (Predicate match) { CheckMatch (match); - return GetIndex (0, _size, match); + return Array.GetIndex (_items, 0, _size, match); } public int FindIndex (int startIndex, Predicate match) { CheckMatch (match); - CheckIndex (startIndex); - return GetIndex (startIndex, _size - startIndex, match); + CheckStartIndex (startIndex); + return Array.GetIndex (_items, startIndex, _size - startIndex, match); } public int FindIndex (int startIndex, int count, Predicate match) { CheckMatch (match); - CheckRange (startIndex, count); - return GetIndex (startIndex, count, match); - } - int GetIndex (int startIndex, int count, Predicate match) - { - int end = startIndex + count; - for (int i = startIndex; i < end; i ++) - if (match (_items [i])) - return i; - - return -1; + CheckRangeOutOfRange (startIndex, count); + return Array.GetIndex (_items, startIndex, count, match); } public T FindLast (Predicate match) { CheckMatch (match); - int i = GetLastIndex (0, _size, match); + int i = Array.GetLastIndex (_items, 0, _size, match); return i == -1 ? default (T) : this [i]; } public int FindLastIndex (Predicate match) { CheckMatch (match); - return GetLastIndex (0, _size, match); + return Array.GetLastIndex (_items, 0, _size, match); } public int FindLastIndex (int startIndex, Predicate match) { CheckMatch (match); - CheckIndex (startIndex); - return GetLastIndex (0, startIndex + 1, match); + CheckStartIndex (startIndex); + return Array.GetLastIndex (_items, 0, startIndex + 1, match); } public int FindLastIndex (int startIndex, int count, Predicate match) { CheckMatch (match); - int start = startIndex - count + 1; - CheckRange (start, count); - return GetLastIndex (start, count, match); - } + CheckStartIndex (startIndex); + + if (count < 0) + throw new ArgumentOutOfRangeException ("count"); - int GetLastIndex (int startIndex, int count, Predicate match) - { - // unlike FindLastIndex, takes regular params for search range - for (int i = startIndex + count; i != startIndex;) - if (match (_items [--i])) - return i; - return -1; + if (startIndex - count + 1 < 0) + throw new ArgumentOutOfRangeException ("count must refer to a location within the collection"); + + return Array.GetLastIndex (_items, startIndex - count + 1, count, match); } - + public void ForEach (Action action) { if (action == null) @@ -423,6 +436,12 @@ namespace System.Collections.Generic { if (index < 0 || (uint) index > (uint) _size) throw new ArgumentOutOfRangeException ("index"); } + + void CheckStartIndex (int index) + { + if (index < 0 || (uint) index > (uint) _size) + throw new ArgumentOutOfRangeException ("startIndex"); + } public void Insert (int index, T item) { diff --git a/mcs/class/corlib/System.Collections/CollectionBase.cs b/mcs/class/corlib/System.Collections/CollectionBase.cs index 75817380b1..d3f6a40ea9 100644 --- a/mcs/class/corlib/System.Collections/CollectionBase.cs +++ b/mcs/class/corlib/System.Collections/CollectionBase.cs @@ -37,6 +37,8 @@ namespace System.Collections { [ComVisible(true)] [Serializable] + [System.Diagnostics.DebuggerDisplay ("Count={Count}")] + [System.Diagnostics.DebuggerTypeProxy (typeof (CollectionDebuggerView))] #if INSIDE_CORLIB public #else diff --git a/mcs/class/corlib/System.Diagnostics/DebuggerTypeProxyAttribute.cs b/mcs/class/corlib/System.Diagnostics/DebuggerTypeProxyAttribute.cs index 92ccb86c90..637636e75d 100644 --- a/mcs/class/corlib/System.Diagnostics/DebuggerTypeProxyAttribute.cs +++ b/mcs/class/corlib/System.Diagnostics/DebuggerTypeProxyAttribute.cs @@ -1,8 +1,9 @@ // // System.Diagnostics.DebuggerTypeProxyAttribute.cs // -// Author: +// Authors: // Chris Toshok (toshok@novell.com) +// Marek Safar (marek.safar@gmail.com) // // @@ -46,8 +47,12 @@ namespace System.Diagnostics { proxy_type_name = typeName; } - public DebuggerTypeProxyAttribute (Type type) { - proxy_type_name = type.Name; + public DebuggerTypeProxyAttribute (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + proxy_type_name = type.AssemblyQualifiedName; } public string ProxyTypeName { diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs index f93cac3933..131254f422 100644 --- a/mcs/class/corlib/System.Globalization/CultureInfo.cs +++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs @@ -44,7 +44,7 @@ namespace System.Globalization { static volatile CultureInfo invariant_culture_info = new CultureInfo (InvariantCultureId, false, true); static object shared_table_lock = new object (); - internal static int BootstrapCultureID; + static CultureInfo default_current_culture; #pragma warning disable 169, 649 bool m_isReadOnly; @@ -99,7 +99,7 @@ namespace System.Globalization // Used by Thread.set_CurrentCulture internal byte[] cached_serialized_form; - const int InvariantCultureId = 0x7F; + internal const int InvariantCultureId = 0x7F; const int CalendarTypeBits = 8; const string MSG_READONLY = "This instance is read only"; @@ -124,10 +124,24 @@ namespace System.Globalization internal static CultureInfo ConstructCurrentCulture () { - CultureInfo ci = new CultureInfo (); - if (!ConstructInternalLocaleFromCurrentLocale (ci)) + if (default_current_culture != null) + return default_current_culture; + + var locale_name = get_current_locale_name (); + CultureInfo ci = null; + try { + ci = CreateSpecificCulture (locale_name); + } catch { + } + + if (ci == null) { ci = InvariantCulture; - BootstrapCultureID = ci.cultureID; + } else { + ci.m_isReadOnly = true; + ci.m_useUserOverride = true; + } + + default_current_culture = ci; return ci; } @@ -535,9 +549,10 @@ namespace System.Globalization } } - public static CultureInfo InstalledUICulture - { - get { return GetCultureInfo (BootstrapCultureID); } + public static CultureInfo InstalledUICulture { + get { + return ConstructCurrentCulture (); + } } public bool IsReadOnly { @@ -568,24 +583,14 @@ namespace System.Globalization constructed = true; } - static bool ConstructInternalLocaleFromCurrentLocale (CultureInfo ci) - { - if (!construct_internal_locale_from_current_locale (ci)) - return false; - return true; - } - [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern bool construct_internal_locale_from_lcid (int lcid); [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern bool construct_internal_locale_from_name (string name); -// [MethodImplAttribute (MethodImplOptions.InternalCall)] -// private extern static bool construct_internal_locale_from_specific_name (CultureInfo ci, string name); - [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern static bool construct_internal_locale_from_current_locale (CultureInfo ci); + private extern static string get_current_locale_name (); [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern static CultureInfo [] internal_get_cultures (bool neutral, bool specific, bool installed); @@ -678,13 +683,7 @@ namespace System.Globalization } if (!construct_internal_locale_from_name (name.ToLowerInvariant ())) { -#if NET_4_0 - throw new CultureNotFoundException ("name", - "Culture name " + name + " is not supported."); -#else - throw new ArgumentException ("Culture name " + name + - " is not supported.", "name"); -#endif + throw CreateNotFoundException (name); } } @@ -789,28 +788,20 @@ namespace System.Globalization if (name.Length == 0) return InvariantCulture; - CultureInfo ci = null; - try { - ci = new CultureInfo (name); - } catch (Exception) { - // TODO: Use construct_internal_locale_from_name when it's not bound to constructor instead - // of try-catch + var src_name = name; + name = name.ToLowerInvariant (); + CultureInfo ci = new CultureInfo (); + + if (!ci.construct_internal_locale_from_name (name)) { int idx = name.IndexOf ('-'); - if (idx > 0) { - try { - ci = new CultureInfo (name.Substring (0, idx)); - } catch { - } - } - - if (ci == null) - throw; + if (idx < 1 || !ci.construct_internal_locale_from_name (name.Substring (0, idx))) + throw CreateNotFoundException (src_name); } - if (!ci.IsNeutralCulture) - return ci; + if (ci.IsNeutralCulture) + ci = CreateSpecificCultureFromNeutral (ci.Name); - return CreateSpecificCultureFromNeutral (ci.Name); + return ci; } // @@ -1007,25 +998,32 @@ namespace System.Globalization return CreateCalendar (1 << CalendarTypeBits); // return invariant calandar if not found return (Calendar) Activator.CreateInstance (type); } + + static Exception CreateNotFoundException (string name) + { +#if NET_4_0 + return new CultureNotFoundException ("name", "Culture name " + name + " is not supported."); +#else + return new ArgumentException ("Culture name " + name + " is not supported.", "name"); +#endif + } #if NET_4_5 - [MonoTODO] public static CultureInfo DefaultThreadCurrentCulture { get { - throw new NotImplementedException (); + return Thread.default_culture; } set { - throw new NotImplementedException (); + Thread.default_culture = value; } } - [MonoTODO] public static CultureInfo DefaultThreadCurrentUICulture { get { - throw new NotImplementedException (); + return Thread.default_ui_culture; } set { - throw new NotImplementedException (); + Thread.default_ui_culture = value; } } #endif diff --git a/mcs/class/corlib/System.Globalization/RegionInfo.cs b/mcs/class/corlib/System.Globalization/RegionInfo.cs index b6165a661d..4f11e37791 100644 --- a/mcs/class/corlib/System.Globalization/RegionInfo.cs +++ b/mcs/class/corlib/System.Globalization/RegionInfo.cs @@ -39,21 +39,15 @@ namespace System.Globalization { static RegionInfo currentRegion; - // This property is not synchronized with CurrentCulture, so - // we need to use bootstrap CurrentCulture LCID. public static RegionInfo CurrentRegion { get { if (currentRegion == null) { - // make sure to fill BootstrapCultureID. CultureInfo ci = CultureInfo.CurrentCulture; - // If current culture is invariant then region is not available. - if (ci != null && CultureInfo.BootstrapCultureID != 0x7F) - currentRegion = new RegionInfo (CultureInfo.BootstrapCultureID); - else + if (ci != null) + return currentRegion = new RegionInfo (ci); + #if MONOTOUCH - currentRegion = CreateFromNSLocale (); -#else - currentRegion = null; + currentRegion = CreateFromNSLocale (); #endif } return currentRegion; @@ -94,6 +88,26 @@ namespace System.Globalization throw new ArgumentException (String.Format ("Region name {0} is not supported.", name), "name"); } + RegionInfo (CultureInfo ci) + { + if (ci.LCID == CultureInfo.InvariantCultureId) { + regionId = 244; + iso2Name = "IV"; + iso3Name = "ivc"; + win3Name = "IVC"; + nativeName = englishName = "Invariant Country"; + currencySymbol = "\u00A4"; + isoCurrencySymbol ="XDR"; + currencyEnglishName = currencyNativeName = "International Monetary Fund"; + return; + } + + if (ci.Territory == null) + throw new NotImplementedException ("Neutral region info"); + + construct_internal_region_from_name (ci.Territory.ToUpperInvariant ()); + } + bool GetByTerritory (CultureInfo ci) { if (ci == null) diff --git a/mcs/class/corlib/System.Globalization/TextInfo.cs b/mcs/class/corlib/System.Globalization/TextInfo.cs index cd4b95be98..56493a3436 100644 --- a/mcs/class/corlib/System.Globalization/TextInfo.cs +++ b/mcs/class/corlib/System.Globalization/TextInfo.cs @@ -225,10 +225,12 @@ namespace System.Globalization { // then don't capitalize it. int saved = i; while (++i < str.Length) { - if (Char.IsWhiteSpace (str [i])) + var ch = str [i]; + var category = char.GetUnicodeCategory (ch); + if (IsSeparator (category)) break; - t = ToTitleCase (str [i]); - if (t != str [i]) { + t = ToTitleCase (ch); + if (t != ch) { allTitle = false; break; } @@ -242,9 +244,11 @@ namespace System.Globalization { // where we don't have to modify // the source word. while (++i < str.Length) { - if (Char.IsWhiteSpace (str [i])) + var ch = str [i]; + var category = char.GetUnicodeCategory (ch); + if (IsSeparator (category)) break; - if (ToLower (str [i]) != str [i]) { + if (ToLower (ch) != ch) { capitalize = true; i = saved; break; @@ -259,9 +263,11 @@ namespace System.Globalization { sb.Append (ToTitleCase (str [i])); start = i + 1; while (++i < str.Length) { - if (Char.IsWhiteSpace (str [i])) + var ch = str [i]; + var category = char.GetUnicodeCategory (ch); + if (IsSeparator (category)) break; - sb.Append (ToLower (str [i])); + sb.Append (ToLower (ch)); } start = i; } @@ -272,6 +278,27 @@ namespace System.Globalization { return sb != null ? sb.ToString () : str; } + static bool IsSeparator (UnicodeCategory category) + { + switch (category) { + case UnicodeCategory.SpaceSeparator: + case UnicodeCategory.LineSeparator: + case UnicodeCategory.ParagraphSeparator: + case UnicodeCategory.Control: + case UnicodeCategory.Format: + case UnicodeCategory.ConnectorPunctuation: + case UnicodeCategory.DashPunctuation: + case UnicodeCategory.OpenPunctuation: + case UnicodeCategory.ClosePunctuation: + case UnicodeCategory.InitialQuotePunctuation: + case UnicodeCategory.FinalQuotePunctuation: + case UnicodeCategory.OtherPunctuation: + return true; + } + + return false; + } + // Only Azeri and Turkish have their own special cases. // Other than them, all languages have common special case // (enumerable enough). diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs index 3eeb79195b..a1a6d12130 100644 --- a/mcs/class/corlib/System.IO/Path.cs +++ b/mcs/class/corlib/System.IO/Path.cs @@ -289,9 +289,8 @@ namespace System.IO { return fullpath; } - [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx - // http://www.codeproject.com/Tips/223321/Win32-API-GetFullPathName + [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull); internal static string GetFullPathName(string path) diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs index fecea2d8b7..d718e1fb05 100644 --- a/mcs/class/corlib/System.IO/Stream.cs +++ b/mcs/class/corlib/System.IO/Stream.cs @@ -303,7 +303,7 @@ namespace System.IO async Task CopyToAsync (Stream destination, byte[] buffer, CancellationToken cancellationToken) { int nread; - while ((nread = await ReadAsync (buffer, 0, buffer.Length).ConfigureAwait (false)) != 0) + while ((nread = await ReadAsync (buffer, 0, buffer.Length, cancellationToken).ConfigureAwait (false)) != 0) await destination.WriteAsync (buffer, 0, nread, cancellationToken).ConfigureAwait (false); } diff --git a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs index 327166e448..ce4fdda324 100644 --- a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs +++ b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs @@ -236,5 +236,20 @@ namespace System.Reflection return Type.EmptyTypes; return types; } + +#if NET_4_5 + public override bool HasDefaultValue { + get { + object defaultValue = DefaultValue; + if (defaultValue == null) + return true; + + if (defaultValue.GetType () == typeof(DBNull) || defaultValue.GetType () == typeof(Missing)) + return false; + + return true; + } + } +#endif } } diff --git a/mcs/class/corlib/System.Reflection/MonoProperty.cs b/mcs/class/corlib/System.Reflection/MonoProperty.cs index eb1aa06efe..24dcf8b747 100644 --- a/mcs/class/corlib/System.Reflection/MonoProperty.cs +++ b/mcs/class/corlib/System.Reflection/MonoProperty.cs @@ -299,7 +299,7 @@ namespace System.Reflection { { if (index == null || index.Length == 0) { /*FIXME we should check if the number of arguments matches the expected one, otherwise the error message will be pretty criptic.*/ -#if !MONOTOUCH +#if !FULL_AOT_RUNTIME if (cached_getter == null) { MethodInfo method = GetGetMethod (true); if (!DeclaringType.IsValueType && !method.ContainsGenericParameters) { //FIXME find a way to build an invoke delegate for value types. diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs index 890dffd3b2..1c00fb96c1 100644 --- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs +++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs @@ -193,8 +193,7 @@ namespace System.Reflection public virtual IEnumerable CustomAttributes { get { return GetCustomAttributesData (); } } - - [MonoTODO] + public virtual bool HasDefaultValue { get { throw new NotImplementedException (); } } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs index 197ece5adc..cdb7a33db1 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs @@ -69,20 +69,15 @@ namespace System.Runtime.CompilerServices public static AsyncTaskMethodBuilder Create () { - var task = new Task (TaskActionInvoker.Empty, null, CancellationToken.None, TaskCreationOptions.None, null); + var task = new Task (TaskActionInvoker.Promise, null, CancellationToken.None, TaskCreationOptions.None, null); task.SetupScheduler (TaskScheduler.Current); return new AsyncTaskMethodBuilder (task); } public void SetException (Exception exception) { - if (exception is OperationCanceledException) { - if (Task.TrySetCanceled ()) - return; - } else { - if (Task.TrySetException (new AggregateException (exception))) - return; - } + if (Task.TrySetException (new AggregateException (exception), exception is OperationCanceledException, true)) + return; throw new InvalidOperationException ("The task has already completed"); } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs index f955d6b9fd..9d539dfc42 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs @@ -69,20 +69,15 @@ namespace System.Runtime.CompilerServices public static AsyncTaskMethodBuilder Create () { - var task = new Task (TaskActionInvoker.Empty, null, CancellationToken.None, TaskCreationOptions.None, null); + var task = new Task (TaskActionInvoker.Promise, null, CancellationToken.None, TaskCreationOptions.None, null); task.SetupScheduler (TaskScheduler.Current); return new AsyncTaskMethodBuilder (task); } public void SetException (Exception exception) { - if (exception is OperationCanceledException) { - if (Task.TrySetCanceled ()) - return; - } else { - if (Task.TrySetException (new AggregateException (exception))) - return; - } + if (Task.TrySetException (new AggregateException (exception), exception is OperationCanceledException, true)) + return; throw new InvalidOperationException ("The task has already completed"); } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs index 1252d062b5..838b31c55d 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs @@ -28,6 +28,7 @@ #if NET_4_5 +using System.Threading; using System.Threading.Tasks; using System.Runtime.ExceptionServices; @@ -54,6 +55,9 @@ namespace System.Runtime.CompilerServices public void GetResult () { + if (!task.IsCompleted) + task.WaitCore (Timeout.Infinite, CancellationToken.None, true); + if (task.Status != TaskStatus.RanToCompletion) ExceptionDispatchInfo.Capture (TaskAwaiter.HandleUnexpectedTaskResult (task)).Throw (); } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs index 380c05f3fe..b96b1cc6f3 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs @@ -28,6 +28,7 @@ #if NET_4_5 +using System.Threading; using System.Threading.Tasks; using System.Runtime.ExceptionServices; @@ -54,6 +55,9 @@ namespace System.Runtime.CompilerServices public TResult GetResult () { + if (!task.IsCompleted) + task.WaitCore (Timeout.Infinite, CancellationToken.None, true); + if (task.Status != TaskStatus.RanToCompletion) ExceptionDispatchInfo.Capture (TaskAwaiter.HandleUnexpectedTaskResult (task)).Throw (); diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs index ab2c8cadd6..5f857d2796 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs @@ -53,7 +53,7 @@ namespace System.Runtime.CompilerServices public void GetResult () { if (!task.IsCompleted) - task.WaitCore (Timeout.Infinite, CancellationToken.None); + task.WaitCore (Timeout.Infinite, CancellationToken.None, true); if (task.Status != TaskStatus.RanToCompletion) // Merge current and dispatched stack traces if there is any @@ -64,20 +64,47 @@ namespace System.Runtime.CompilerServices { switch (task.Status) { case TaskStatus.Canceled: + // Use original exception when we have one + if (task.ExceptionSlot.Exception != null) + goto case TaskStatus.Faulted; + return new TaskCanceledException (task); case TaskStatus.Faulted: - return task.Exception.InnerException; + return task.ExceptionSlot.Exception.InnerException; default: - throw new ArgumentException ("Should never be reached"); + throw new ArgumentException (string.Format ("Unexpected task `{0}' status `{1}'", task.Id, task.Status)); } } internal static void HandleOnCompleted (Task task, Action continuation, bool continueOnSourceContext, bool manageContext) { - if (continueOnSourceContext && SynchronizationContext.Current != null) { + if (continueOnSourceContext && SynchronizationContext.Current != null && SynchronizationContext.Current.GetType () != typeof (SynchronizationContext)) { task.ContinueWith (new SynchronizationContextContinuation (continuation, SynchronizationContext.Current)); } else { - task.ContinueWith (new ActionContinuation (continuation)); + IContinuation cont; + Task cont_task; + if (continueOnSourceContext && !TaskScheduler.IsDefault) { + cont_task = new Task (TaskActionInvoker.Create (continuation), null, CancellationToken.None, TaskCreationOptions.None, null); + cont_task.SetupScheduler (TaskScheduler.Current); + cont = new SchedulerAwaitContinuation (cont_task); + } else { + cont_task = null; + cont = new AwaiterActionContinuation (continuation); + } + + // + // This is awaiter continuation. For finished tasks we get false result and need to + // queue the continuation otherwise the task would block + // + if (task.ContinueWith (cont, false)) + return; + + if (cont_task == null) { + cont_task = new Task (TaskActionInvoker.Create (continuation), null, CancellationToken.None, TaskCreationOptions.None, null); + cont_task.SetupScheduler (TaskScheduler.Current); + } + + cont_task.Schedule (); } } diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs index f12db5fe57..b59a0ef005 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs @@ -53,7 +53,7 @@ namespace System.Runtime.CompilerServices public TResult GetResult () { if (!task.IsCompleted) - task.WaitCore (Timeout.Infinite, CancellationToken.None); + task.WaitCore (Timeout.Infinite, CancellationToken.None, true); if (task.Status != TaskStatus.RanToCompletion) ExceptionDispatchInfo.Capture (TaskAwaiter.HandleUnexpectedTaskResult (task)).Throw (); diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs b/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs index 9376526952..3ba0446cd4 100644 --- a/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs +++ b/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs @@ -60,12 +60,12 @@ namespace System.Runtime.CompilerServices throw new ArgumentNullException ("continuation"); var ctx = SynchronizationContext.Current; - if (ctx != null) { + if (ctx != null && ctx.GetType () != typeof (SynchronizationContext)) { ctx.Post (l => ((Action) l) (), continuation); return; } - if (TaskScheduler.Current == TaskScheduler.Default) { + if (TaskScheduler.IsDefault) { // // Pass continuation as an argument to avoid allocating // hoisting class diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs new file mode 100644 index 0000000000..284839e093 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs @@ -0,0 +1,46 @@ +#if NET_4_5 +// +// DefaultInterfaceAttribute.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + public sealed class DefaultInterfaceAttribute : Attribute + { + public Type DefaultInterface { + get; + private set; + } + + public DefaultInterfaceAttribute (Type defaultInterface) + { + DefaultInterface = defaultInterface; + } + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs new file mode 100644 index 0000000000..33dbc8343d --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs @@ -0,0 +1,53 @@ +#if NET_4_5 +// +// DesignerNamespaceResolveEventArgs.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Collections.ObjectModel; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [ComVisibleAttribute(false)] + public class DesignerNamespaceResolveEventArgs : EventArgs + { + public DesignerNamespaceResolveEventArgs (string namespaceName) + { + NamespaceName = namespaceName; + ResolvedAssemblyFiles = new Collection (); + } + + public string NamespaceName { + get; + private set; + } + + public Collection ResolvedAssemblyFiles { + get; + private set; + } + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs new file mode 100644 index 0000000000..35d4161d3c --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs @@ -0,0 +1,59 @@ +#if NET_4_5 +// +// EventRegistrationToken.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + public struct EventRegistrationToken + { +#pragma warning disable 0649 + long value; +#pragma warning restore 0649 + + public static bool operator == (EventRegistrationToken left, EventRegistrationToken right) + { + return left.value == right.value; + } + + public static bool operator != (EventRegistrationToken left, EventRegistrationToken right) + { + return left.value != right.value; + } + + public override bool Equals (object obj) + { + return ((EventRegistrationToken)obj).value == value; + } + + public override int GetHashCode () + { + return unchecked ((int)value); + } + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs new file mode 100644 index 0000000000..e4d7623f22 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs @@ -0,0 +1,68 @@ +#if NET_4_5 +// +// EventRegistrationTokenTable.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [MonoTODO] + public sealed class EventRegistrationTokenTable + where T : class + { + public EventRegistrationTokenTable () + { + throw new NotImplementedException (); + } + + public T InvocationList { + get { throw new NotImplementedException (); } + set { throw new NotImplementedException (); } + } + + public EventRegistrationToken AddEventHandler (T handler) + { + throw new NotImplementedException (); + } + + public static EventRegistrationTokenTable GetOrCreateEventRegistrationTokenTable(ref EventRegistrationTokenTable refEventTable) + { + throw new NotImplementedException (); + } + + public void RemoveEventHandler (T handler) + { + throw new NotImplementedException (); + } + + public void RemoveEventHandler (EventRegistrationToken token) + { + throw new NotImplementedException (); + } + } +} +#endif + diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs new file mode 100644 index 0000000000..e7d010d1b7 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs @@ -0,0 +1,38 @@ +#if NET_4_5 +// +// IActivationFactory.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [Guid("00000035-0000-0000-C000-000000000046")] + public interface IActivationFactory + { + object ActivateInstance (); + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs new file mode 100644 index 0000000000..995019325e --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs @@ -0,0 +1,71 @@ +#if NET_4_5 +// +// InterfaceImplementedInVersionAttribute.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + public sealed class InterfaceImplementedInVersionAttribute : Attribute + { + public InterfaceImplementedInVersionAttribute (Type interfaceType, byte majorVersion, byte minorVersion, + byte buildVersion, byte revisionVersion) + { + InterfaceType = interfaceType; + MajorVersion = majorVersion; + MinorVersion = minorVersion; + BuildVersion = buildVersion; + RevisionVersion = revisionVersion; + } + + public byte BuildVersion { + get; + private set; + } + + public Type InterfaceType { + get; + private set; + } + + public byte MajorVersion { + get; + private set; + } + + public byte MinorVersion { + get; + private set; + } + + public byte RevisionVersion { + get; + private set; + } + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs new file mode 100644 index 0000000000..f57569b2bb --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs @@ -0,0 +1,60 @@ +#if NET_4_5 +// +// NamespaceResolveEventArgs.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Reflection; +using System.Collections.ObjectModel; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [ComVisibleAttribute(false)] + public class NamespaceResolveEventArgs : EventArgs + { + public NamespaceResolveEventArgs (string namespaceName, Assembly requestingAssembly) + { + NamespaceName = namespaceName; + RequestingAssembly = requestingAssembly; + ResolvedAssemblies = new Collection (); + } + + public string NamespaceName { + get; + private set; + } + + public Assembly RequestingAssembly { + get; + private set; + } + + public Collection ResolvedAssemblies { + get; + private set; + } + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs new file mode 100644 index 0000000000..0c5ecc3d9e --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs @@ -0,0 +1,37 @@ +#if NET_4_5 +// +// ReadOnlyArrayAttribute.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)] + public sealed class ReadOnlyArrayAttribute : Attribute + { + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs new file mode 100644 index 0000000000..8fd0173157 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs @@ -0,0 +1,44 @@ +// +// ReturnValueNameAttribute.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [AttributeUsageAttribute(AttributeTargets.Delegate|AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = false)] + public sealed class ReturnValueNameAttribute : Attribute + { + public ReturnValueNameAttribute (string name) + { + Name = name; + } + + public string Name { + get; + private set; + } + } +} diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs new file mode 100644 index 0000000000..fc24594805 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs @@ -0,0 +1,72 @@ +#if NET_4_5 +// +// WindowsRuntimeMarshal.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [MonoTODO] + public static class WindowsRuntimeMarshal + { + public static void AddEventHandler ( Func addMethod, Action removeMethod, T handler) + { + throw new NotImplementedException (); + } + + public static void FreeHString (IntPtr ptr) + { + throw new NotImplementedException (); + } + + public static IActivationFactory GetActivationFactory (Type type) + { + throw new NotImplementedException (); + } + + public static string PtrToStringHString (IntPtr ptr) + { + throw new NotImplementedException (); + } + + public static void RemoveAllEventHandlers(Action removeMethod) + { + throw new NotImplementedException (); + } + + public static void RemoveEventHandler (Action removeMethod, T handler) + { + throw new NotImplementedException (); + } + + public static IntPtr StringToHString (string s) + { + throw new NotImplementedException (); + } + } +} +#endif + diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs new file mode 100644 index 0000000000..445733626c --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs @@ -0,0 +1,53 @@ +#if NET_4_5 +// +// WindowsRuntimeMetadata.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [MonoTODO] + public static class WindowsRuntimeMetadata + { + public static IEnumerable ResolveNamespace (string namespaceName, IEnumerable packageGraphFilePaths) + { + throw new NotImplementedException (); + } + + public static IEnumerable ResolveNamespace (string namespaceName, string windowsSdkFilePath, IEnumerable packageGraphFilePaths) + { + throw new NotImplementedException (); + } + +#pragma warning disable 0067 + public static event EventHandler DesignerNamespaceResolve; + public static event EventHandler ReflectionOnlyNamespaceResolve; +#pragma warning restore 0067 + } +} +#endif + diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs new file mode 100644 index 0000000000..7d5e461494 --- /dev/null +++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs @@ -0,0 +1,37 @@ +#if NET_4_5 +// +// WriteOnlyArrayAttribute.cs +// +// Author: +// Martin Baulig +// +// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +using System; +using System.Runtime.CompilerServices; + +namespace System.Runtime.InteropServices.WindowsRuntime +{ + [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)] + public sealed class WriteOnlyArrayAttribute : Attribute + { + } +} +#endif diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs index a3134933a3..a66a8dc7ae 100644 --- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs +++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs @@ -187,6 +187,12 @@ namespace System.Runtime.InteropServices throw new NotImplementedException (); } +#if NET_4_5 + public static IntPtr CreateAggregatedObject (IntPtr pOuter, T o) { + return CreateAggregatedObject (pOuter, (object)o); + } +#endif + #if !FULL_AOT_RUNTIME public static object CreateWrapperOfType (object o, Type t) { @@ -204,12 +210,24 @@ namespace System.Runtime.InteropServices return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy (); } + +#if NET_4_5 + public static TWrapper CreateWrapperOfType (T o) { + return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper)); + } +#endif #endif [MethodImplAttribute(MethodImplOptions.InternalCall)] [ComVisible (true)] public extern static void DestroyStructure (IntPtr ptr, Type structuretype); +#if NET_4_5 + public static void DestroyStructure (IntPtr ptr) { + DestroyStructure (ptr, typeof (T)); + } +#endif + [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static void FreeBSTR (IntPtr ptr); @@ -329,6 +347,12 @@ namespace System.Runtime.InteropServices #endif } +#if NET_4_5 + public static IntPtr GetComInterfaceForObject (T o) { + return GetComInterfaceForObject ((object)o, typeof (T)); + } +#endif + [MonoTODO] public static IntPtr GetComInterfaceForObjectInContext (object o, Type t) { @@ -463,6 +487,12 @@ namespace System.Runtime.InteropServices Marshal.StructureToPtr(vt, pDstNativeVariant, false); } +#if NET_4_5 + public static void GetNativeVariantForObject (T obj, IntPtr pDstNativeVariant) { + GetNativeVariantForObject ((object)obj, pDstNativeVariant); + } +#endif + #if !MOBILE [MethodImplAttribute (MethodImplOptions.InternalCall)] private static extern object GetObjectForCCW (IntPtr pUnk); @@ -489,6 +519,13 @@ namespace System.Runtime.InteropServices return vt.GetValue(); } +#if NET_4_5 + public static T GetObjectForNativeVariant (IntPtr pSrcNativeVariant) { + Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant)); + return (T)vt.GetValue(); + } +#endif + public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars) { if (cVars < 0) @@ -500,6 +537,18 @@ namespace System.Runtime.InteropServices return objects; } +#if NET_4_5 + public static T[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars) { + if (cVars < 0) + throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number."); + T[] objects = new T[cVars]; + for (int i = 0; i < cVars; i++) + objects[i] = GetObjectForNativeVariant ((IntPtr)(aSrcNativeVariant.ToInt64 () + + i * SizeOf (typeof(Variant)))); + return objects; + } +#endif + [MonoTODO] public static int GetStartComSlot (Type t) { @@ -639,6 +688,12 @@ namespace System.Runtime.InteropServices [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static IntPtr OffsetOf (Type t, string fieldName); +#if NET_4_5 + public static IntPtr OffsetOf (string fieldName) { + return OffsetOf (typeof (T), fieldName); + } +#endif + [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static void Prelink (MethodInfo m); @@ -687,6 +742,16 @@ namespace System.Runtime.InteropServices [ComVisible (true)] public extern static object PtrToStructure (IntPtr ptr, Type structureType); +#if NET_4_5 + public static void PtrToStructure (IntPtr ptr, T structure) { + PtrToStructure (ptr, (object)structure); + } + + public static object PtrToStructure (IntPtr ptr) { + return PtrToStructure (ptr, typeof (T)); + } +#endif + #if !MOBILE [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern static int QueryInterfaceInternal (IntPtr pUnk, ref Guid iid, out IntPtr ppv); @@ -913,6 +978,16 @@ namespace System.Runtime.InteropServices [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static int SizeOf (Type t); +#if NET_4_5 + public static int SizeOf () { + return SizeOf (typeof (T)); + } + + public static int SizeOf (T structure) { + return SizeOf (structure.GetType ()); + } +#endif + [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static IntPtr StringToBSTR (string s); @@ -1059,6 +1134,12 @@ namespace System.Runtime.InteropServices [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static void StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld); +#if NET_4_5 + public static void StructureToPtr (T structure, IntPtr ptr, bool fDeleteOld) { + StructureToPtr ((object)structure, ptr, fDeleteOld); + } +#endif + public static void ThrowExceptionForHR (int errorCode) { Exception ex = GetExceptionForHR (errorCode); if (ex != null) @@ -1074,6 +1155,12 @@ namespace System.Runtime.InteropServices [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index); +#if NET_4_5 + public static IntPtr UnsafeAddrOfPinnedArrayElement (T[] arr, int index) { + return UnsafeAddrOfPinnedArrayElement ((Array)arr, index); + } +#endif + public static void WriteByte (IntPtr ptr, byte val) { unsafe { @@ -1266,6 +1353,12 @@ namespace System.Runtime.InteropServices return GetDelegateForFunctionPointerInternal (ptr, t); } +#if NET_4_5 + public static Delegate GetDelegateForFunctionPointer (IntPtr ptr) { + return GetDelegateForFunctionPointer (ptr, typeof (T)); + } +#endif + [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern IntPtr GetFunctionPointerForDelegateInternal (Delegate d); @@ -1276,5 +1369,14 @@ namespace System.Runtime.InteropServices return GetFunctionPointerForDelegateInternal (d); } + +#if NET_4_5 + public static IntPtr GetFunctionPointerForDelegate (TDelegate d) { + if (d == null) + throw new ArgumentNullException ("d"); + + return GetFunctionPointerForDelegateInternal ((Delegate)(object)d); + } +#endif } } diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/CallContext.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/CallContext.cs index 4b5352a4ae..fad4eaf4e4 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/CallContext.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/CallContext.cs @@ -46,6 +46,7 @@ namespace System.Runtime.Remoting.Messaging public sealed class CallContext { [ThreadStatic] static Header [] Headers; + [ThreadStatic] static Hashtable logicalDatastore; [ThreadStatic] static Hashtable datastore; [ThreadStatic] static object hostContext; @@ -62,28 +63,37 @@ namespace System.Runtime.Remoting.Messaging public static void FreeNamedDataSlot (string name) { Datastore.Remove (name); + LogicalDatastore.Remove (name); } public static object GetData (string name) { - return Datastore [name]; + if (LogicalDatastore.ContainsKey (name)) { + return LogicalDatastore [name]; + } else { + return Datastore [name]; + } } public static void SetData (string name, object data) { - Datastore [name] = data; + if (data is ILogicalThreadAffinative) { + LogicalSetData (name, data); + } else { + LogicalDatastore.Remove (name); + Datastore [name] = data; + } } - - [MonoTODO] + public static object LogicalGetData (string name) { - throw new NotImplementedException (); + return LogicalDatastore [name]; } - - [MonoTODO] + public static void LogicalSetData (string name, object data) { - throw new NotImplementedException (); + Datastore.Remove (name); + LogicalDatastore [name] = data; } public static Header[] GetHeaders () @@ -99,12 +109,11 @@ namespace System.Runtime.Remoting.Messaging internal static LogicalCallContext CreateLogicalCallContext (bool createEmpty) { LogicalCallContext ctx = null; - if (datastore != null) { - foreach (DictionaryEntry entry in datastore) - if (entry.Value is ILogicalThreadAffinative) { - if (ctx == null) ctx = new LogicalCallContext (); - ctx.SetData ((string)entry.Key, entry.Value); - } + if (logicalDatastore != null) { + ctx = new LogicalCallContext (); + foreach (DictionaryEntry entry in logicalDatastore) { + ctx.SetData ((string)entry.Key, entry.Value); + } } if (ctx == null && createEmpty) @@ -115,26 +124,31 @@ namespace System.Runtime.Remoting.Messaging internal static object SetCurrentCallContext (LogicalCallContext ctx) { - object oldData = datastore; + object oldData = new object[] { datastore, logicalDatastore }; if (ctx != null && ctx.HasInfo) - datastore = (Hashtable) ctx.Datastore.Clone (); + logicalDatastore = (Hashtable) ctx.Datastore.Clone (); else - datastore = null; + logicalDatastore = null; return oldData; } - internal static void UpdateCurrentCallContext (LogicalCallContext ctx) + internal static void UpdateCurrentLogicalCallContext (LogicalCallContext ctx) { Hashtable data = ctx.Datastore; + if (data == null) + return; + foreach (DictionaryEntry entry in data) - SetData ((string)entry.Key, entry.Value); + LogicalSetData ((string)entry.Key, entry.Value); } internal static void RestoreCallContext (object oldContext) { - datastore = (Hashtable) oldContext; + object[] contextArray = (object[])oldContext; + datastore = (Hashtable)contextArray [0]; + logicalDatastore = (Hashtable)contextArray [1]; } private static Hashtable Datastore @@ -146,6 +160,16 @@ namespace System.Runtime.Remoting.Messaging return r; } } + + private static Hashtable LogicalDatastore + { + get { + Hashtable r = logicalDatastore; + if (r == null) + return logicalDatastore = new Hashtable (); + return r; + } + } } [System.Runtime.InteropServices.ComVisible (true)] diff --git a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs index 745c161344..d430e9ccc1 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Proxies/RealProxy.cs @@ -218,7 +218,7 @@ namespace System.Runtime.Remoting.Proxies } if (res_msg.LogicalCallContext != null && res_msg.LogicalCallContext.HasInfo) - CallContext.UpdateCurrentCallContext (res_msg.LogicalCallContext); + CallContext.UpdateCurrentLogicalCallContext (res_msg.LogicalCallContext); exc = res_msg.Exception; diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index f4bab8d4ad..66ef9ce0e6 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -796,7 +796,7 @@ namespace System.Runtime.Remoting if (obj is CACD) { CACD cad = (CACD) obj; obj = cad.d; - CallContext.UpdateCurrentCallContext ((LogicalCallContext) cad.c); + CallContext.UpdateCurrentLogicalCallContext ((LogicalCallContext) cad.c); } return obj; } diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs index e2e5f793f3..8ca0307c4d 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs @@ -94,7 +94,7 @@ namespace System.Security.Cryptography.X509Certificates { public static X509Certificate CreateFromCertFile (string filename) { - byte[] data = Load (filename); + byte[] data = File.ReadAllBytes (filename); return new X509Certificate (data); } @@ -376,16 +376,6 @@ namespace System.Security.Cryptography.X509Certificates { return sb.ToString (); } - private static byte[] Load (string fileName) - { - byte[] data = null; - using (FileStream fs = File.OpenRead (fileName)) { - data = new byte [fs.Length]; - fs.Read (data, 0, data.Length); - fs.Close (); - } - return data; - } #if NET_4_0 protected static string FormatDate (DateTime date) { diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs index f3c4a8b277..7d5273ee11 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate20.cs @@ -6,6 +6,7 @@ // // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) // Copyright (C) 2004-2006,2008 Novell, Inc (http://www.novell.com) +// Copyright 2013 Xamarin Inc. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -27,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // - +using System.IO; using System.Runtime.InteropServices; using System.Security.Permissions; using System.Text; @@ -199,6 +200,29 @@ namespace System.Security.Cryptography.X509Certificates { Import (rawData, (string)null, X509KeyStorageFlags.DefaultKeySet); } + private Mono.Security.X509.X509Certificate ImportPkcs12 (byte[] rawData, string password) + { + var pfx = (password == null) ? new Mono.Security.X509.PKCS12 (rawData) : new Mono.Security.X509.PKCS12 (rawData, password); + if (pfx.Certificates.Count == 0) { + // no certificate was found + return null; + } else if (pfx.Keys.Count == 0) { + // no key were found - pick the first certificate + return pfx.Certificates [0]; + } else { + // find the certificate that match the first key + var keypair = (pfx.Keys [0] as AsymmetricAlgorithm); + string pubkey = keypair.ToXmlString (false); + foreach (var c in pfx.Certificates) { + if ((c.RSA != null) && (pubkey == c.RSA.ToXmlString (false))) + return c; + if ((c.DSA != null) && (pubkey == c.DSA.ToXmlString (false))) + return c; + } + return pfx.Certificates [0]; // no match, pick first certificate without keys + } + } + [MonoTODO ("missing KeyStorageFlags support")] [ComVisible (false)] public virtual void Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags) @@ -210,11 +234,7 @@ namespace System.Security.Cryptography.X509Certificates { } catch (Exception e) { try { - PKCS12 pfx = new PKCS12 (rawData); - if (pfx.Certificates.Count > 0) - x509 = pfx.Certificates [0]; - else - x509 = null; + x509 = ImportPkcs12 (rawData, null); } catch { string msg = Locale.GetText ("Unable to decode certificate."); @@ -225,12 +245,7 @@ namespace System.Security.Cryptography.X509Certificates { } else { // try PKCS#12 try { - PKCS12 pfx = new PKCS12 (rawData, password); - if (pfx.Certificates.Count > 0) { - x509 = pfx.Certificates [0]; - } else { - x509 = null; - } + x509 = ImportPkcs12 (rawData, password); } catch { // it's possible to supply a (unrequired/unusued) password @@ -249,7 +264,7 @@ namespace System.Security.Cryptography.X509Certificates { [ComVisible (false)] public virtual void Import (string fileName) { - byte[] rawData = Load (fileName); + byte[] rawData = File.ReadAllBytes (fileName); Import (rawData, (string)null, X509KeyStorageFlags.DefaultKeySet); } @@ -257,14 +272,14 @@ namespace System.Security.Cryptography.X509Certificates { [ComVisible (false)] public virtual void Import (string fileName, string password, X509KeyStorageFlags keyStorageFlags) { - byte[] rawData = Load (fileName); + byte[] rawData = File.ReadAllBytes (fileName); Import (rawData, password, keyStorageFlags); } [MonoTODO ("SecureString support is incomplete, missing KeyStorageFlags support")] public virtual void Import (string fileName, SecureString password, X509KeyStorageFlags keyStorageFlags) { - byte[] rawData = Load (fileName); + byte[] rawData = File.ReadAllBytes (fileName); Import (rawData, (string)null, keyStorageFlags); } diff --git a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs index 14f07dd98c..8c43151529 100644 --- a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs +++ b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs @@ -244,7 +244,7 @@ namespace System.Security.Principal { else { // validate token by getting name _name = GetTokenName (_token); - if ((_name == String.Empty) || (_name == null)) + if (_name == null) throw new SerializationException ("Token doesn't match a user."); } _type = _info.GetString ("m_type"); diff --git a/mcs/class/corlib/System.Text/UTF8Encoding.cs b/mcs/class/corlib/System.Text/UTF8Encoding.cs index bdd80e8a62..1aa56bc9f2 100644 --- a/mcs/class/corlib/System.Text/UTF8Encoding.cs +++ b/mcs/class/corlib/System.Text/UTF8Encoding.cs @@ -852,7 +852,14 @@ fail_no_space: if (charCount < 0) { throw new ArgumentOutOfRangeException ("charCount", _("ArgRange_NonNegative")); } - return charCount * 4; + + // Add 1 to charCount since there may be a lead surrogate left from the previous call to GetBytes/Encoder.Convert + charCount = charCount + 1; + if (EncoderFallback.MaxCharCount > 1) { + charCount = charCount * EncoderFallback.MaxCharCount; + } + + return charCount * 3; } // Get the maximum number of characters needed to decode a @@ -862,7 +869,14 @@ fail_no_space: if (byteCount < 0) { throw new ArgumentOutOfRangeException ("byteCount", _("ArgRange_NonNegative")); } - return byteCount; + + // Add 1 to byteCount since there may be the bytes from part of a surrogate pair left from the previous call to GetChars/Decoder.Convert + int maxCharCount = byteCount + 1; + if (DecoderFallback.MaxCharCount > 1) { + maxCharCount = maxCharCount * DecoderFallback.MaxCharCount; + } + + return maxCharCount; } // Get a UTF8-specific decoder that is attached to this instance. diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs index 62aa14fddc..796b863336 100644 --- a/mcs/class/corlib/System.Threading.Tasks/Task.cs +++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs @@ -49,8 +49,8 @@ namespace System.Threading.Tasks // parent is the outer task in which this task is created readonly Task parent; - // contAncestor is the Task on which this continuation was setup - readonly Task contAncestor; + // A reference to a Task on which this continuation is attached to + Task contAncestor; static int id = -1; static readonly TaskFactory defaultFactory = new TaskFactory (); @@ -182,6 +182,9 @@ namespace System.Threading.Tasks if (IsContinuation) throw new InvalidOperationException ("Start may not be called on a continuation task"); + if (IsPromise) + throw new InvalidOperationException ("Start may not be called on a promise-style task"); + SetupScheduler (scheduler); Schedule (); } @@ -208,6 +211,9 @@ namespace System.Threading.Tasks if (IsContinuation) throw new InvalidOperationException ("RunSynchronously may not be called on a continuation task"); + if (IsPromise) + throw new InvalidOperationException ("RunSynchronously may not be called on a promise-style task"); + RunSynchronouslyCore (scheduler); } @@ -220,11 +226,13 @@ namespace System.Threading.Tasks if (scheduler.RunInline (this, false)) return; } catch (Exception inner) { - throw new TaskSchedulerException (inner); + var ex = new TaskSchedulerException (inner); + TrySetException (new AggregateException (ex), false, true); + throw ex; } Schedule (); - Wait (); + WaitCore (Timeout.Infinite, CancellationToken.None, false); } #endregion @@ -330,18 +338,28 @@ namespace System.Threading.Tasks ContinueWith (new TaskContinuation (continuation, options)); } - internal void ContinueWith (IContinuation continuation) + internal bool ContinueWith (IContinuation continuation, bool canExecuteInline = true) { if (IsCompleted) { + if (!canExecuteInline) + return false; + continuation.Execute (); - return; + return true; } continuations.Add (continuation); // Retry in case completion was achieved but event adding was too late - if (IsCompleted && continuations.Remove (continuation)) + if (IsCompleted) { + continuations.Remove (continuation); + if (!canExecuteInline) + return false; + continuation.Execute (); + } + + return true; } internal void RemoveContinuation (IContinuation continuation) @@ -438,7 +456,7 @@ namespace System.Threading.Tasks return true; } - internal bool TrySetException (AggregateException aggregate) + internal bool TrySetException (AggregateException aggregate, bool cancellation, bool observed) { if (IsCompleted) return false; @@ -450,8 +468,19 @@ namespace System.Threading.Tasks return false; } - - HandleGenericException (aggregate); + + if (cancellation) { + ExceptionSlot.Exception = aggregate; + Thread.MemoryBarrier (); + + CancelReal (); + } else { + HandleGenericException (aggregate); + } + + if (observed) + exSlot.Observed = true; + return true; } @@ -500,7 +529,9 @@ namespace System.Threading.Tasks void InnerInvoke () { if (IsContinuation) { - invoker.Invoke (contAncestor, state, this); + var ancestor = contAncestor; + contAncestor = null; + invoker.Invoke (ancestor, state, this); } else { invoker.Invoke (this, state, this); } @@ -639,7 +670,7 @@ namespace System.Threading.Tasks if (millisecondsTimeout < -1) throw new ArgumentOutOfRangeException ("millisecondsTimeout"); - bool result = WaitCore (millisecondsTimeout, cancellationToken); + bool result = WaitCore (millisecondsTimeout, cancellationToken, true); if (IsCanceled) throw new AggregateException (new TaskCanceledException (this)); @@ -651,13 +682,13 @@ namespace System.Threading.Tasks return result; } - internal bool WaitCore (int millisecondsTimeout, CancellationToken cancellationToken) + internal bool WaitCore (int millisecondsTimeout, CancellationToken cancellationToken, bool runInline) { if (IsCompleted) return true; // If the task is ready to be run and we were supposed to wait on it indefinitely without cancellation, just run it - if (Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled) + if (runInline && Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled) scheduler.RunInline (this, true); bool result = true; @@ -957,11 +988,23 @@ namespace System.Threading.Tasks if (millisecondsDelay < -1) throw new ArgumentOutOfRangeException ("millisecondsDelay"); - var task = new Task (TaskActionInvoker.Delay, millisecondsDelay, cancellationToken, TaskCreationOptions.None, null, TaskConstants.Finished); + if (cancellationToken.IsCancellationRequested) + return TaskConstants.Canceled; + + var task = new Task (TaskActionInvoker.Empty, null, cancellationToken, TaskCreationOptions.None, null, null); task.SetupScheduler (TaskScheduler.Default); - - if (millisecondsDelay != Timeout.Infinite) - task.scheduler.QueueTask (task); + + if (millisecondsDelay != Timeout.Infinite) { + var timer = new Timer (delegate (object state) { + var t = (Task) state; + if (t.Status == TaskStatus.WaitingForActivation) { + t.Status = TaskStatus.Running; + t.Finish (); + } + }, task, millisecondsDelay, -1); + + task.ContinueWith (new DisposeContinuation (timer)); + } return task; } @@ -1068,6 +1111,9 @@ namespace System.Threading.Tasks internal static Task WhenAllCore (IList> tasks) { + if (tasks.Count == 0) + return FromResult(new TResult[0]); + foreach (var t in tasks) { if (t == null) throw new ArgumentException ("tasks", "the tasks argument contains a null element"); @@ -1228,7 +1274,7 @@ namespace System.Threading.Tasks public AggregateException Exception { get { - if (exSlot == null) + if (exSlot == null || !IsFaulted) return null; exSlot.Observed = true; return exSlot.Exception; @@ -1269,7 +1315,7 @@ namespace System.Threading.Tasks } } - TaskExceptionSlot ExceptionSlot { + internal TaskExceptionSlot ExceptionSlot { get { if (exSlot != null) return exSlot; @@ -1314,6 +1360,12 @@ namespace System.Threading.Tasks } } + bool IsPromise { + get { + return invoker == TaskActionInvoker.Promise; + } + } + internal Task ContinuationAncestor { get { return contAncestor; diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs index 513b09968b..72a486f7a8 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs @@ -35,6 +35,7 @@ namespace System.Threading.Tasks abstract class TaskActionInvoker { public static readonly TaskActionInvoker Empty = new EmptyTaskActionInvoker (); + public static readonly TaskActionInvoker Promise = new EmptyTaskActionInvoker (); public static readonly TaskActionInvoker Delay = new DelayTaskInvoker (); sealed class EmptyTaskActionInvoker : TaskActionInvoker @@ -290,12 +291,10 @@ namespace System.Threading.Tasks sealed class FuncTaskSelected : TaskActionInvoker { readonly Func action; - readonly Task[] tasks; - public FuncTaskSelected (Func action, Task[] tasks) + public FuncTaskSelected (Func action) { this.action = action; - this.tasks = tasks; } public override Delegate Action { @@ -306,8 +305,8 @@ namespace System.Threading.Tasks public override void Invoke (Task owner, object state, Task context) { - var result = ((Task) owner).Result; - ((Task) context).Result = action (tasks[result]); + var result = ((Task) owner).Result; + ((Task) context).Result = action (result); } } @@ -492,9 +491,9 @@ namespace System.Threading.Tasks return new ActionTaskSelected (action); } - public static TaskActionInvoker Create (Func action, Task[] tasks) + public static TaskActionInvoker CreateSelected (Func action) { - return new FuncTaskSelected (action, tasks); + return new FuncTaskSelected (action); } #endregion diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs index f4b3a3b81d..f0bc902310 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs @@ -113,7 +113,7 @@ namespace System.Threading.Tasks if (aggregate.InnerExceptions.Count == 0) throw new ArgumentNullException ("exceptions"); - return source.TrySetException (aggregate); + return source.TrySetException (aggregate, false, false); } public bool TrySetResult (TResult result) diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs index 8189df744b..12eaa8be19 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs @@ -110,18 +110,41 @@ namespace System.Threading.Tasks } } - class ActionContinuation : IContinuation + class AwaiterActionContinuation : IContinuation { readonly Action action; - public ActionContinuation (Action action) + public AwaiterActionContinuation (Action action) { this.action = action; } public void Execute () { - action (); + // + // Continuation can be inlined only when the current context allows it. This is different to awaiter setup + // because the context where the awaiter task is set to completed can be anywhere (due to TaskCompletionSource) + // + if ((SynchronizationContext.Current == null || SynchronizationContext.Current.GetType () == typeof (SynchronizationContext)) && TaskScheduler.IsDefault) { + action (); + } else { + ThreadPool.UnsafeQueueUserWorkItem (l => ((Action) l) (), action); + } + } + } + + class SchedulerAwaitContinuation : IContinuation + { + readonly Task task; + + public SchedulerAwaitContinuation (Task task) + { + this.task = task; + } + + public void Execute () + { + task.RunSynchronouslyCore (task.scheduler); } } @@ -179,7 +202,7 @@ namespace System.Threading.Tasks } if (exceptions != null) { - owner.TrySetException (new AggregateException (exceptions)); + owner.TrySetException (new AggregateException (exceptions), false, false); return; } @@ -239,7 +262,7 @@ namespace System.Threading.Tasks } if (exceptions != null) { - owner.TrySetException (new AggregateException (exceptions)); + owner.TrySetException (new AggregateException (exceptions), false, false); return; } @@ -316,6 +339,7 @@ namespace System.Threading.Tasks sealed class CountdownContinuation : IContinuation, IDisposable { readonly CountdownEvent evt; + bool disposed; public CountdownContinuation (int initialCount) { @@ -330,12 +354,33 @@ namespace System.Threading.Tasks public void Dispose () { + disposed = true; + Thread.MemoryBarrier (); + evt.Dispose (); } public void Execute () { - evt.Signal (); + // Guard against possible race when continuation is disposed and some tasks may still + // execute it (removal was late and the execution is slower than the Dispose thread) + if (!disposed) + evt.Signal (); + } + } + + sealed class DisposeContinuation : IContinuation + { + readonly IDisposable instance; + + public DisposeContinuation (IDisposable instance) + { + this.instance = instance; + } + + public void Execute () + { + instance.Dispose (); } } } diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs index 9330fd40a5..a558c622c5 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs @@ -214,9 +214,14 @@ namespace System.Threading.Tasks TaskCreationOptions creationOptions, TaskScheduler scheduler) { - Task t = new Task (function, state, cancellationToken, creationOptions); - t.Start (scheduler); + var t = new Task (function, state, cancellationToken, creationOptions); + // + // Don't start cancelled task it would throw an exception + // + if (!t.IsCompleted) + t.Start (scheduler); + return t; } #endregion @@ -305,7 +310,7 @@ namespace System.Threading.Tasks { CheckContinueArguments (tasks, continuationFunction, continuationOptions, scheduler); - var cont = Task.WhenAnyCore (tasks).ContinueWith (TaskActionInvoker.Create (continuationFunction, tasks), cancellationToken, continuationOptions, scheduler); + var cont = Task.WhenAnyCore (tasks).ContinueWith (TaskActionInvoker.CreateSelected (continuationFunction), cancellationToken, continuationOptions, scheduler); return cont; } diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs index 618c185084..a4031c0a50 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs @@ -100,6 +100,12 @@ namespace System.Threading.Tasks return id; } } + + internal static bool IsDefault { + get { + return currentScheduler == null || currentScheduler == defaultScheduler; + } + } public virtual int MaximumConcurrencyLevel { get { diff --git a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs index c38a566e2c..e1c9a6842c 100644 --- a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs +++ b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs @@ -50,7 +50,7 @@ namespace System.Threading.Tasks return; } - ThreadPool.UnsafeQueueUserWorkItem (callback, task); + ThreadPool.QueueWorkItem (callback, task); } static void TaskExecuterCallback (object obj) diff --git a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs b/mcs/class/corlib/System.Threading/CancellationTokenSource.cs index b82e49f59b..59637dd0a3 100644 --- a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs +++ b/mcs/class/corlib/System.Threading/CancellationTokenSource.cs @@ -133,7 +133,7 @@ namespace System.Threading try { Action cb; - for (int id = int.MinValue + 1; id <= currId; id++) { + for (int id = currId; id != int.MinValue; id--) { if (!callbacks.TryRemove (new CancellationTokenRegistration (id, this), out cb)) continue; if (cb == null) diff --git a/mcs/class/corlib/System.Threading/Monitor.cs b/mcs/class/corlib/System.Threading/Monitor.cs index 4a326041cb..d6a289e76b 100644 --- a/mcs/class/corlib/System.Threading/Monitor.cs +++ b/mcs/class/corlib/System.Threading/Monitor.cs @@ -227,10 +227,12 @@ namespace System.Threading #endif #if NET_4_5 - [MonoTODO] + [MethodImplAttribute(MethodImplOptions.InternalCall)] + extern static bool Monitor_test_owner (object obj); + public static bool IsEntered (object obj) { - throw new NotImplementedException (); + return Monitor_test_owner(obj); } #endif } diff --git a/mcs/class/corlib/System.Threading/NamedDataSlot.cs b/mcs/class/corlib/System.Threading/NamedDataSlot.cs index 9997be1f5d..4c9d31624a 100644 --- a/mcs/class/corlib/System.Threading/NamedDataSlot.cs +++ b/mcs/class/corlib/System.Threading/NamedDataSlot.cs @@ -64,6 +64,7 @@ namespace System.Threading LocalDataStoreSlot slot; if (!datastorehash.TryGetValue (name, out slot)) { slot = new LocalDataStoreSlot (true); + datastorehash.Add (name, slot); } return slot; diff --git a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs index 3a75238f4d..bf5f3da002 100644 --- a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs +++ b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs @@ -171,9 +171,11 @@ namespace System.Threading if (stopCondition ()) return false; - if (wait.Count > spinCount) - handle.WaitOne (Math.Min (Math.Max (millisecondsTimeout - (int)sw.ElapsedMilliseconds, 1), deepSleepTime)); - else + if (wait.Count > spinCount) { + int timeout = millisecondsTimeout < 0 ? deepSleepTime : + Math.Min (Math.Max (millisecondsTimeout - (int)sw.ElapsedMilliseconds, 1), deepSleepTime); + handle.WaitOne (timeout); + } else wait.SpinOnce (); } } while (true); diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs index 813c458f94..5af6800382 100644 --- a/mcs/class/corlib/System.Threading/Thread.cs +++ b/mcs/class/corlib/System.Threading/Thread.cs @@ -137,6 +137,8 @@ namespace System.Threading { IPrincipal principal; int principal_version; + bool current_culture_set; + bool current_ui_culture_set; CultureInfo current_culture; CultureInfo current_ui_culture; @@ -156,6 +158,9 @@ namespace System.Threading { static NamedDataSlot namedDataSlot; + static internal CultureInfo default_culture; + static internal CultureInfo default_ui_culture; + // can be both a ThreadStart and a ParameterizedThreadStart private MulticastDelegate threadstart; //private string thread_name=null; @@ -470,11 +475,13 @@ namespace System.Threading { public CultureInfo CurrentCulture { get { CultureInfo culture = current_culture; - if (culture != null) + if (current_culture_set && culture != null) return culture; + if (default_culture != null) + return default_culture; + current_culture = culture = CultureInfo.ConstructCurrentCulture (); - NumberFormatter.SetThreadCurrentCulture (culture); return culture; } @@ -485,16 +492,19 @@ namespace System.Threading { value.CheckNeutral (); current_culture = value; - NumberFormatter.SetThreadCurrentCulture (value); + current_culture_set = true; } } public CultureInfo CurrentUICulture { get { CultureInfo culture = current_ui_culture; - if (culture != null) + if (current_ui_culture_set && culture != null) return culture; + if (default_ui_culture != null) + return default_ui_culture; + current_ui_culture = culture = CultureInfo.ConstructCurrentUICulture (); return culture; } @@ -503,6 +513,7 @@ namespace System.Threading { if (value == null) throw new ArgumentNullException ("value"); current_ui_culture = value; + current_ui_culture_set = true; } } diff --git a/mcs/class/corlib/System.Threading/ThreadPool.cs b/mcs/class/corlib/System.Threading/ThreadPool.cs index 4d3f1c086c..204386f9f7 100644 --- a/mcs/class/corlib/System.Threading/ThreadPool.cs +++ b/mcs/class/corlib/System.Threading/ThreadPool.cs @@ -87,9 +87,6 @@ namespace System.Threading { if (ar == null) return false; } else { - if (!callBack.HasSingleTarget) - throw new Exception ("The delegate must have only one target"); - AsyncResult ares = new AsyncResult (callBack, state, true); pool_queue (ares); } @@ -99,6 +96,12 @@ namespace System.Threading { [MethodImplAttribute(MethodImplOptions.InternalCall)] static extern void pool_queue (AsyncResult ares); + // TODO: It should be interface interface only to avoid extra allocation + internal static void QueueWorkItem (WaitCallback callBack, object state) + { + pool_queue (new AsyncResult (callBack, state, false)); + } + public static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object state, @@ -168,11 +171,11 @@ namespace System.Threading { [SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)] public static bool UnsafeQueueUserWorkItem (WaitCallback callBack, object state) { + if (callBack == null) + throw new ArgumentNullException ("callBack"); + // no stack propagation here (that's why it's unsafe and requires extra security permissions) if (!callBack.IsTransparentProxy ()) { - if (!callBack.HasSingleTarget) - throw new Exception ("The delegate must have only one target"); - AsyncResult ares = new AsyncResult (callBack, state, false); pool_queue (ares); return true; diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs index 6335877605..dd32032436 100644 --- a/mcs/class/corlib/System.Threading/Timer.cs +++ b/mcs/class/corlib/System.Threading/Timer.cs @@ -337,7 +337,7 @@ namespace System.Threading list.RemoveAt (i); count--; i--; - ThreadPool.UnsafeQueueUserWorkItem (TimerCB, timer); + ThreadPool.QueueWorkItem (TimerCB, timer); long period = timer.period_ms; long due_time = timer.due_time_ms; bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite)); diff --git a/mcs/class/corlib/System/AggregateException.cs b/mcs/class/corlib/System/AggregateException.cs index 145319acdd..c0df741af1 100644 --- a/mcs/class/corlib/System/AggregateException.cs +++ b/mcs/class/corlib/System/AggregateException.cs @@ -163,7 +163,7 @@ namespace System public override Exception GetBaseException () { - if (innerExceptions == null || innerExceptions.Count == 0) + if (innerExceptions == null || innerExceptions.Count != 1) return this; return innerExceptions[0].GetBaseException (); } diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs index 91654019f1..756378c56d 100644 --- a/mcs/class/corlib/System/Array.cs +++ b/mcs/class/corlib/System/Array.cs @@ -2864,32 +2864,54 @@ namespace System { if (array == null) throw new ArgumentNullException ("array"); + + if (match == null) + throw new ArgumentNullException ("match"); - return FindLastIndex (array, 0, array.Length, match); + return GetLastIndex (array, 0, array.Length, match); } public static int FindLastIndex (T [] array, int startIndex, Predicate match) { if (array == null) throw new ArgumentNullException (); + + if (startIndex < 0 || (uint) startIndex > (uint) array.Length) + throw new ArgumentOutOfRangeException ("startIndex"); + + if (match == null) + throw new ArgumentNullException ("match"); - return FindLastIndex (array, startIndex, array.Length - startIndex, match); + return GetLastIndex (array, 0, startIndex + 1, match); } public static int FindLastIndex (T [] array, int startIndex, int count, Predicate match) { if (array == null) throw new ArgumentNullException ("array"); + if (match == null) throw new ArgumentNullException ("match"); + + if (startIndex < 0 || (uint) startIndex > (uint) array.Length) + throw new ArgumentOutOfRangeException ("startIndex"); - if (startIndex > array.Length || startIndex + count > array.Length) - throw new ArgumentOutOfRangeException (); - - for (int i = startIndex + count - 1; i >= startIndex; i--) - if (match (array [i])) + if (count < 0) + throw new ArgumentOutOfRangeException ("count"); + + if (startIndex - count + 1 < 0) + throw new ArgumentOutOfRangeException ("count must refer to a location within the array"); + + return GetLastIndex (array, startIndex - count + 1, count, match); + } + + internal static int GetLastIndex (T[] array, int startIndex, int count, Predicate match) + { + // unlike FindLastIndex, takes regular params for search range + for (int i = startIndex + count; i != startIndex;) + if (match (array [--i])) return i; - + return -1; } @@ -2897,16 +2919,25 @@ namespace System { if (array == null) throw new ArgumentNullException ("array"); + + if (match == null) + throw new ArgumentNullException ("match"); - return FindIndex (array, 0, array.Length, match); + return GetIndex (array, 0, array.Length, match); } public static int FindIndex (T [] array, int startIndex, Predicate match) { if (array == null) throw new ArgumentNullException ("array"); - - return FindIndex (array, startIndex, array.Length - startIndex, match); + + if (startIndex < 0 || (uint) startIndex > (uint) array.Length) + throw new ArgumentOutOfRangeException ("startIndex"); + + if (match == null) + throw new ArgumentNullException ("match"); + + return GetIndex (array, startIndex, array.Length - startIndex, match); } public static int FindIndex (T [] array, int startIndex, int count, Predicate match) @@ -2914,13 +2945,22 @@ namespace System if (array == null) throw new ArgumentNullException ("array"); - if (match == null) - throw new ArgumentNullException ("match"); + if (startIndex < 0) + throw new ArgumentOutOfRangeException ("startIndex"); - if (startIndex > array.Length || startIndex + count > array.Length) - throw new ArgumentOutOfRangeException (); - - for (int i = startIndex; i < startIndex + count; i ++) + if (count < 0) + throw new ArgumentOutOfRangeException ("count"); + + if ((uint) startIndex + (uint) count > (uint) array.Length) + throw new ArgumentOutOfRangeException ("index and count exceed length of list"); + + return GetIndex (array, startIndex, count, match); + } + + internal static int GetIndex (T[] array, int startIndex, int count, Predicate match) + { + int end = startIndex + count; + for (int i = startIndex; i < end; i ++) if (match (array [i])) return i; diff --git a/mcs/class/corlib/System/ArraySegment.cs b/mcs/class/corlib/System/ArraySegment.cs index 77d76ad069..612e603f60 100644 --- a/mcs/class/corlib/System/ArraySegment.cs +++ b/mcs/class/corlib/System/ArraySegment.cs @@ -134,13 +134,13 @@ namespace System T IList.this[int index] { get { - if (index < 0 || count < index) + if (index < 0 || index >= count) throw new ArgumentOutOfRangeException ("index"); return array[offset + index]; } set { - if (index < 0 || count < index) + if (index < 0 || index >= count) throw new ArgumentOutOfRangeException ("index"); array[offset + index] = value; diff --git a/mcs/class/corlib/System/Attribute.cs b/mcs/class/corlib/System/Attribute.cs index 46d0b775db..be91a7a182 100644 --- a/mcs/class/corlib/System/Attribute.cs +++ b/mcs/class/corlib/System/Attribute.cs @@ -258,7 +258,7 @@ namespace System public override int GetHashCode () { - int result = TypeId.GetHashCode (); + int result = GetType ().GetHashCode (); FieldInfo[] fields = GetType ().GetFields (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); foreach (FieldInfo field in fields) { diff --git a/mcs/class/corlib/System/ConsoleKeyInfo.cs b/mcs/class/corlib/System/ConsoleKeyInfo.cs index c62c8d0d03..961cb949d6 100644 --- a/mcs/class/corlib/System/ConsoleKeyInfo.cs +++ b/mcs/class/corlib/System/ConsoleKeyInfo.cs @@ -31,80 +31,83 @@ namespace System { [Serializable] public struct ConsoleKeyInfo { internal static ConsoleKeyInfo Empty = new ConsoleKeyInfo ('\0', 0, false, false, false); - ConsoleKey key; - char keychar; - ConsoleModifiers modifiers; + ConsoleKey _key; + char _keyChar; + ConsoleModifiers _mods; public ConsoleKeyInfo (char keyChar, ConsoleKey key, bool shift, bool alt, bool control) { - this.key = key; - this.keychar = keyChar; - modifiers = 0; + _key = key; + _keyChar = keyChar; + _mods = 0; SetModifiers (shift, alt, control); } internal ConsoleKeyInfo (ConsoleKeyInfo other) { - this.key = other.key; - this.keychar = other.keychar; - this.modifiers = other.modifiers; + _key = other._key; + _keyChar = other._keyChar; + _mods = other._mods; } internal void SetKey (ConsoleKey key) { - this.key = key; + _key = key; } internal void SetKeyChar (char keyChar) { - this.keychar = keyChar; + _keyChar = keyChar; } internal void SetModifiers (bool shift, bool alt, bool control) { - this.modifiers = (shift) ? ConsoleModifiers.Shift : 0; - this.modifiers |= (alt) ? ConsoleModifiers.Alt : 0; - this.modifiers |= (control) ? ConsoleModifiers.Control : 0; + _mods = (shift) ? ConsoleModifiers.Shift : 0; + _mods |= (alt) ? ConsoleModifiers.Alt : 0; + _mods |= (control) ? ConsoleModifiers.Control : 0; } - public ConsoleKey Key { - get { return key; } + public ConsoleKey Key + { + get { return _key; } } - public char KeyChar { - get { return keychar; } + public char KeyChar + { + get { return _keyChar; } } - public ConsoleModifiers Modifiers { - get { return modifiers; } + public ConsoleModifiers Modifiers + { + get { return _mods; } } - + public override bool Equals (object value) { if (!(value is ConsoleKeyInfo)) return false; + return Equals ((ConsoleKeyInfo) value); } - + public static bool operator == (ConsoleKeyInfo a, ConsoleKeyInfo b) { return a.Equals (b); } - + public static bool operator != (ConsoleKeyInfo a, ConsoleKeyInfo b) { return !a.Equals (b); } - + public bool Equals (ConsoleKeyInfo obj) { - return key == obj.key && obj.keychar == keychar && obj.modifiers == modifiers; + return _key == obj._key && _keyChar == obj._keyChar && _mods == obj._mods; } - + public override int GetHashCode () { - return key.GetHashCode () ^ keychar.GetHashCode () ^ modifiers.GetHashCode (); + return _key.GetHashCode () ^ _keyChar.GetHashCode () ^ _mods.GetHashCode (); } } } - diff --git a/mcs/class/corlib/System/Convert.cs b/mcs/class/corlib/System/Convert.cs index ae3b87120a..a17181f38b 100644 --- a/mcs/class/corlib/System/Convert.cs +++ b/mcs/class/corlib/System/Convert.cs @@ -1,12 +1,13 @@ // // System.Convert.cs // -// Author: +// Authors: // Derek Holden (dholden@draper.com) // Duncan Mak (duncan@ximian.com) +// Marek Safar (marek.safar@gmail.com) // // (C) Ximian, Inc. http://www.ximian.com -// +// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com) // // System.Convert class. This was written word for word off the // Library specification for System.Convert in the ECMA TC39 TG2 @@ -2528,6 +2529,7 @@ namespace System { typeof (DateTime), // 16 TypeCode.DateTime null, // 17 null. typeof (String), // 18 TypeCode.String + typeof (Enum) }; // Function to convert an object to another type and return @@ -2561,67 +2563,69 @@ namespace System { if (value.GetType () == conversionType) return value; - if (value is IConvertible) { - IConvertible convertValue = (IConvertible) value; + IConvertible convertValue = value as IConvertible; + if (convertValue != null) { if (conversionType == conversionTable[0]) // 0 Empty throw new ArgumentNullException (); - else if (conversionType == conversionTable[1]) // 1 TypeCode.Object - return (object) value; + if (conversionType == conversionTable[1]) // 1 TypeCode.Object + return value; - else if (conversionType == conversionTable[2]) // 2 TypeCode.DBNull + if (conversionType == conversionTable[2]) // 2 TypeCode.DBNull throw new InvalidCastException ( "Cannot cast to DBNull, it's not IConvertible"); - else if (conversionType == conversionTable[3]) // 3 TypeCode.Boolean - return (object) convertValue.ToBoolean (provider); + if (conversionType == conversionTable[3]) // 3 TypeCode.Boolean + return convertValue.ToBoolean (provider); - else if (conversionType == conversionTable[4]) // 4 TypeCode.Char - return (object) convertValue.ToChar (provider); + if (conversionType == conversionTable[4]) // 4 TypeCode.Char + return convertValue.ToChar (provider); - else if (conversionType == conversionTable[5]) // 5 TypeCode.SByte - return (object) convertValue.ToSByte (provider); + if (conversionType == conversionTable[5]) // 5 TypeCode.SByte + return convertValue.ToSByte (provider); - else if (conversionType == conversionTable[6]) // 6 TypeCode.Byte - return (object) convertValue.ToByte (provider); + if (conversionType == conversionTable[6]) // 6 TypeCode.Byte + return convertValue.ToByte (provider); - else if (conversionType == conversionTable[7]) // 7 TypeCode.Int16 - return (object) convertValue.ToInt16 (provider); + if (conversionType == conversionTable[7]) // 7 TypeCode.Int16 + return convertValue.ToInt16 (provider); - else if (conversionType == conversionTable[8]) // 8 TypeCode.UInt16 - return (object) convertValue.ToUInt16 (provider); + if (conversionType == conversionTable[8]) // 8 TypeCode.UInt16 + return convertValue.ToUInt16 (provider); - else if (conversionType == conversionTable[9]) // 9 TypeCode.Int32 - return (object) convertValue.ToInt32 (provider); + if (conversionType == conversionTable[9]) // 9 TypeCode.Int32 + return convertValue.ToInt32 (provider); - else if (conversionType == conversionTable[10]) // 10 TypeCode.UInt32 - return (object) convertValue.ToUInt32 (provider); + if (conversionType == conversionTable[10]) // 10 TypeCode.UInt32 + return convertValue.ToUInt32 (provider); - else if (conversionType == conversionTable[11]) // 11 TypeCode.Int64 - return (object) convertValue.ToInt64 (provider); + if (conversionType == conversionTable[11]) // 11 TypeCode.Int64 + return convertValue.ToInt64 (provider); - else if (conversionType == conversionTable[12]) // 12 TypeCode.UInt64 - return (object) convertValue.ToUInt64 (provider); + if (conversionType == conversionTable[12]) // 12 TypeCode.UInt64 + return convertValue.ToUInt64 (provider); - else if (conversionType == conversionTable[13]) // 13 TypeCode.Single - return (object) convertValue.ToSingle (provider); + if (conversionType == conversionTable[13]) // 13 TypeCode.Single + return convertValue.ToSingle (provider); - else if (conversionType == conversionTable[14]) // 14 TypeCode.Double - return (object) convertValue.ToDouble (provider); + if (conversionType == conversionTable[14]) // 14 TypeCode.Double + return convertValue.ToDouble (provider); - else if (conversionType == conversionTable[15]) // 15 TypeCode.Decimal - return (object) convertValue.ToDecimal (provider); + if (conversionType == conversionTable[15]) // 15 TypeCode.Decimal + return convertValue.ToDecimal (provider); - else if (conversionType == conversionTable[16]) // 16 TypeCode.DateTime - return (object) convertValue.ToDateTime (provider); + if (conversionType == conversionTable[16]) // 16 TypeCode.DateTime + return convertValue.ToDateTime (provider); - else if (conversionType == conversionTable[18]) // 18 TypeCode.String - return (object) convertValue.ToString (provider); - else { - if (try_target_to_type) - return convertValue.ToType (conversionType, provider); - } + if (conversionType == conversionTable[18]) // 18 TypeCode.String + return convertValue.ToString (provider); + + if (conversionType == conversionTable[19] && value is Enum) // System.Enum + return value; + + if (try_target_to_type) + return convertValue.ToType (conversionType, provider); } // Not in the conversion table throw new InvalidCastException ((Locale.GetText ( diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs index aa4301d016..507153c421 100644 --- a/mcs/class/corlib/System/Delegate.cs +++ b/mcs/class/corlib/System/Delegate.cs @@ -527,7 +527,7 @@ namespace System return source; if (source.GetType () != value.GetType ()) - throw new ArgumentException ("Delegate type mismatch"); + throw new ArgumentException (Locale.GetText ("Incompatible Delegate Types. First is {0} second is {1}.", source.GetType ().FullName, value.GetType ().FullName)); return source.RemoveImpl (value); } diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs index c16e604d97..ecf2ed1898 100644 --- a/mcs/class/corlib/System/Enum.cs +++ b/mcs/class/corlib/System/Enum.cs @@ -278,9 +278,8 @@ namespace System { if (targetType == null) throw new ArgumentNullException ("targetType"); - if (targetType == typeof (string)) - return ToString (provider); - return Convert.ToType (Value, targetType, provider, false); + + return Convert.ToType (this, targetType, provider, false); } ushort IConvertible.ToUInt16 (IFormatProvider provider) diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs index d1b4015c03..13d63ccc12 100644 --- a/mcs/class/corlib/System/Environment.cs +++ b/mcs/class/corlib/System/Environment.cs @@ -56,7 +56,7 @@ namespace System { * of icalls, do not require an increment. */ #pragma warning disable 169 - private const int mono_corlib_version = 110; + private const int mono_corlib_version = 111; #pragma warning restore 169 [ComVisible (true)] diff --git a/mcs/class/corlib/System/MulticastDelegate.cs b/mcs/class/corlib/System/MulticastDelegate.cs index ab7583652c..0550ff8284 100644 --- a/mcs/class/corlib/System/MulticastDelegate.cs +++ b/mcs/class/corlib/System/MulticastDelegate.cs @@ -43,19 +43,17 @@ namespace System [StructLayout (LayoutKind.Sequential)] public abstract class MulticastDelegate : Delegate { - private MulticastDelegate prev; - private MulticastDelegate kpm_next; + MulticastDelegate prev; + MulticastDelegate kpm_next; protected MulticastDelegate (object target, string method) : base (target, method) { - prev = null; } protected MulticastDelegate (Type target, string method) : base (target, method) { - prev = null; } public override void GetObjectData (SerializationInfo info, StreamingContext context) @@ -72,9 +70,6 @@ namespace System return base.DynamicInvokeImpl (args); } - internal bool HasSingleTarget { - get { return prev == null; } - } // // Equals: two multicast delegates are equal if their base is equal // and their invocations list is equal. diff --git a/mcs/class/corlib/System/NumberFormatter.cs b/mcs/class/corlib/System/NumberFormatter.cs index 4f948aaf38..dc0fb5a1e1 100644 --- a/mcs/class/corlib/System/NumberFormatter.cs +++ b/mcs/class/corlib/System/NumberFormatter.cs @@ -557,9 +557,7 @@ namespace System private void Resize (int len) { - char[] newBuf = new char [len]; - Array.Copy (_cbuf, newBuf, _ind); - _cbuf = newBuf; + Array.Resize (ref _cbuf, len); } private void Append (char c) @@ -783,6 +781,7 @@ namespace System threadNumberFormatter = null; if (res == null) return new NumberFormatter (Thread.CurrentThread); + res.CurrentCulture = Thread.CurrentThread.CurrentCulture; return res; } @@ -791,12 +790,6 @@ namespace System threadNumberFormatter = this; } - internal static void SetThreadCurrentCulture (CultureInfo culture) - { - if (threadNumberFormatter != null) - threadNumberFormatter.CurrentCulture = culture; - } - public static string NumberToString (string format, sbyte value, IFormatProvider fp) { NumberFormatter inst = GetInstance(); diff --git a/mcs/class/corlib/System/Random.cs b/mcs/class/corlib/System/Random.cs index 1f84216ffe..0bf5c74627 100644 --- a/mcs/class/corlib/System/Random.cs +++ b/mcs/class/corlib/System/Random.cs @@ -4,13 +4,12 @@ // Authors: // Bob Smith (bob@thestuff.net) // Ben Maurer (bmaurer@users.sourceforge.net) +// Sebastien Pouliot // // (C) 2001 Bob Smith. http://www.thestuff.net // (C) 2003 Ben Maurer -// - -// // Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// Copyright 2013 Xamarin Inc. (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -39,12 +38,11 @@ namespace System [ComVisible (true)] public class Random { - const int MBIG = int.MaxValue; - const int MSEED = 161803398; + uint x; + uint y; + uint z; + uint c; - int inext, inextp; - int [] SeedArray = new int [56]; - public Random () : this (Environment.TickCount) { @@ -52,75 +50,28 @@ namespace System public Random (int Seed) { - int ii; - int mj, mk; - - // Numerical Recipes in C online @ http://www.library.cornell.edu/nr/bookcpdf/c7-1.pdf - - // Math.Abs throws on Int32.MinValue, so we need to work around that case. - // Fixes: 605797 - if (Seed == Int32.MinValue) - mj = MSEED - Math.Abs (Int32.MinValue + 1); - else - mj = MSEED - Math.Abs (Seed); - - SeedArray [55] = mj; - mk = 1; - for (int i = 1; i < 55; i++) { // [1, 55] is special (Knuth) - ii = (21 * i) % 55; - SeedArray [ii] = mk; - mk = mj - mk; - if (mk < 0) - mk += MBIG; - mj = SeedArray [ii]; - } - for (int k = 1; k < 5; k++) { - for (int i = 1; i < 56; i++) { - SeedArray [i] -= SeedArray [1 + (i + 30) % 55]; - if (SeedArray [i] < 0) - SeedArray [i] += MBIG; - } - } - inext = 0; - inextp = 31; - } - - protected virtual double Sample () - { - int retVal; - - if (++inext >= 56) inext = 1; - if (++inextp >= 56) inextp = 1; - - retVal = SeedArray [inext] - SeedArray [inextp]; - - if (retVal < 0) - retVal += MBIG; - - SeedArray [inext] = retVal; - - return retVal * (1.0 / MBIG); - } - - public virtual int Next () - { - return (int)(Sample () * int.MaxValue); + x = (uint) Seed; + y = (uint) 987654321; + z = (uint) 43219876; + c = (uint) 6543217; } - public virtual int Next (int maxValue) + uint JKiss () { - if (maxValue < 0) - throw new ArgumentOutOfRangeException(Locale.GetText ( - "Max value is less than min value.")); - - return (int)(Sample () * maxValue); + x = 314527869 * x + 1234567; + y ^= y << 5; + y ^= y >> 7; + y ^= y << 22; + ulong t = ((ulong) 4294584393 * z + c); + c = (uint) (t >> 32); + z = (uint) t; + return (x + y + z); } public virtual int Next (int minValue, int maxValue) { if (minValue > maxValue) - throw new ArgumentOutOfRangeException (Locale.GetText ( - "Min value is greater than max value.")); + throw new ArgumentOutOfRangeException ("Maximum value is less than minimal value."); // special case: a difference of one (or less) will always return the minimum // e.g. -1,-1 or -1,0 will always return -1 @@ -128,7 +79,28 @@ namespace System if (diff <= 1) return minValue; - return (int)((uint)(Sample () * diff) + minValue); + return minValue + ((int) (JKiss () % diff)); + } + + public virtual int Next (int maxValue) + { + if (maxValue < 0) + throw new ArgumentOutOfRangeException ("Maximum value is less than minimal value."); + + return maxValue > 0 ? (int)(JKiss () % maxValue) : 0; + } + + public virtual int Next () + { + // returns a non-negative, [0 - Int32.MacValue], random number + // but we want to avoid calls to Math.Abs (call cost and branching cost it requires) + // and the fact it would throw for Int32.MinValue (so roughly 1 time out of 2^32) + int random = (int) JKiss (); + while (random == Int32.MinValue) + random = (int) JKiss (); + int mask = random >> 31; + random ^= mask; + return random + (mask & 1); } public virtual void NextBytes (byte [] buffer) @@ -136,14 +108,39 @@ namespace System if (buffer == null) throw new ArgumentNullException ("buffer"); - for (int i = 0; i < buffer.Length; i++) { - buffer [i] = (byte)(Sample () * (byte.MaxValue + 1)); + // each random `int` can fill 4 bytes + int p = 0; + uint random; + for (int i = 0; i < (buffer.Length >> 2); i++) { + random = JKiss (); + buffer [p++] = (byte) (random >> 24); + buffer [p++] = (byte) (random >> 16); + buffer [p++] = (byte) (random >> 8); + buffer [p++] = (byte) random; + } + if (p == buffer.Length) + return; + + // complete the array + random = JKiss (); + while (p < buffer.Length) { + buffer [p++] = (byte) random; + random >>= 8; } } public virtual double NextDouble () { - return this.Sample (); + // return a double value between [0,1] + return Sample (); + } + + protected virtual double Sample () + { + // a single 32 bits random value is not enough to create a random double value + uint a = JKiss () >> 6; // Upper 26 bits + uint b = JKiss () >> 5; // Upper 27 bits + return (a * 134217728.0 + b) / 9007199254740992.0; } } -} +} \ No newline at end of file diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs index d30735f9bd..1d32ab6d41 100644 --- a/mcs/class/corlib/System/String.cs +++ b/mcs/class/corlib/System/String.cs @@ -2710,9 +2710,7 @@ namespace System if (values == null) throw new ArgumentNullException ("values"); - var stringList = new List (); - foreach (var v in values) - stringList.Add (v); + var stringList = new List (values); return JoinUnchecked (separator, stringList.ToArray (), 0, stringList.Count); } @@ -2743,11 +2741,13 @@ namespace System if (values == null) throw new ArgumentNullException ("values"); - var stringList = new List (); - foreach (var v in values) - stringList.Add (v.ToString ()); + var stringList = values as IList ?? new List (values); + var strCopy = new string [stringList.Count]; + int i = 0; + foreach (var v in stringList) + strCopy [i++] = v.ToString (); - return JoinUnchecked (separator, stringList.ToArray (), 0, stringList.Count); + return JoinUnchecked (separator, strCopy, 0, strCopy.Length); } public static bool IsNullOrWhiteSpace (string value) diff --git a/mcs/class/corlib/System/TimeZone.cs b/mcs/class/corlib/System/TimeZone.cs index 316e99ce44..5e11d8d53d 100644 --- a/mcs/class/corlib/System/TimeZone.cs +++ b/mcs/class/corlib/System/TimeZone.cs @@ -357,12 +357,22 @@ namespace System if (time.Kind == DateTimeKind.Utc) return TimeSpan.Zero; - if (IsDaylightSavingTime (time)) + if (IsDaylightSavingTime (time) && !IsAmbiguousTime (time)) return utcOffsetWithDLS; return utcOffsetWithOutDLS; } + private bool IsAmbiguousTime (DateTime time) + { + if (time.Kind == DateTimeKind.Utc) + return false; + + DaylightTime changes = GetDaylightChanges (time.Year); + + return time < changes.End && time >= changes.End - changes.Delta; + } + void IDeserializationCallback.OnDeserialization (object sender) { OnDeserialization (null); diff --git a/mcs/class/corlib/System/Tuples.cs b/mcs/class/corlib/System/Tuples.cs index ac15adfec6..a9631dbbda 100644 --- a/mcs/class/corlib/System/Tuples.cs +++ b/mcs/class/corlib/System/Tuples.cs @@ -48,23 +48,20 @@ namespace System this.item7 = item7; this.rest = rest; - bool ok = true; - if (!typeof (TRest).IsGenericType) - ok = false; - if (ok) { - Type t = typeof (TRest).GetGenericTypeDefinition (); - if (!(t == typeof (Tuple<>) || t == typeof (Tuple<,>) || t == typeof (Tuple<,,>) || t == typeof (Tuple<,,,>) || t == typeof (Tuple<,,,,>) || t == typeof (Tuple <,,,,,>) || t == typeof (Tuple<,,,,,,>) || t == typeof (Tuple<,,,,,,,>))) - ok = false; - } - if (!ok) + if (!(rest is ITuple)) throw new ArgumentException ("rest", "The last element of an eight element tuple must be a Tuple."); } } + interface ITuple + { + string ToString (); + } + /* The rest is generated by the script at the bottom */ [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; @@ -117,14 +114,19 @@ namespace System return comparer.GetHashCode (item1); } + string ITuple.ToString () + { + return String.Format ("{0}", item1); + } + public override string ToString () { - return String.Format ("({0})", item1); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -183,19 +185,25 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - return h; + int h0; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}", item1, item2); } public override string ToString () { - return String.Format ("({0}, {1})", item1, item2); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -263,20 +271,26 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - return h; + int h0; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item3); + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}", item1, item2, item3); } public override string ToString () { - return String.Format ("({0}, {1}, {2})", item1, item2, item3); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -353,21 +367,28 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - h = (h << 5) - h + comparer.GetHashCode (item4); - return h; + int h0, h1; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h1 = comparer.GetHashCode (item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item4); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}, {3}", item1, item2, item3, item4); } public override string ToString () { - return String.Format ("({0}, {1}, {2}, {3})", item1, item2, item3, item4); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -453,22 +474,29 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - h = (h << 5) - h + comparer.GetHashCode (item4); - h = (h << 5) - h + comparer.GetHashCode (item5); - return h; + int h0, h1; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h1 = comparer.GetHashCode (item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item4); + h0 = (h0 << 5) + h0 ^ h1; + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item5); + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}, {3}, {4}", item1, item2, item3, item4, item5); } public override string ToString () { - return String.Format ("({0}, {1}, {2}, {3}, {4})", item1, item2, item3, item4, item5); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -563,23 +591,31 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - h = (h << 5) - h + comparer.GetHashCode (item4); - h = (h << 5) - h + comparer.GetHashCode (item5); - h = (h << 5) - h + comparer.GetHashCode (item6); - return h; + int h0, h1; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h1 = comparer.GetHashCode (item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode (item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item6); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}, {3}, {4}, {5}", item1, item2, item3, item4, item5, item6); } public override string ToString () { - return String.Format ("({0}, {1}, {2}, {3}, {4}, {5})", item1, item2, item3, item4, item5, item6); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -683,24 +719,32 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - h = (h << 5) - h + comparer.GetHashCode (item4); - h = (h << 5) - h + comparer.GetHashCode (item5); - h = (h << 5) - h + comparer.GetHashCode (item6); - h = (h << 5) - h + comparer.GetHashCode (item7); - return h; + int h0, h1; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h1 = comparer.GetHashCode (item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode (item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item6); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item7); + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}, {3}, {4}, {5}, {6}", item1, item2, item3, item4, item5, item6, item7); } public override string ToString () { - return String.Format ("({0}, {1}, {2}, {3}, {4}, {5}, {6})", item1, item2, item3, item4, item5, item6, item7); + return "(" + ((ITuple) this).ToString () + ")"; } } [Serializable] - public partial class Tuple : IStructuralEquatable, IStructuralComparable, IComparable + public partial class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple { T1 item1; T2 item2; @@ -801,20 +845,29 @@ namespace System int IStructuralEquatable.GetHashCode (IEqualityComparer comparer) { - int h = comparer.GetHashCode (item1); - h = (h << 5) - h + comparer.GetHashCode (item2); - h = (h << 5) - h + comparer.GetHashCode (item3); - h = (h << 5) - h + comparer.GetHashCode (item4); - h = (h << 5) - h + comparer.GetHashCode (item5); - h = (h << 5) - h + comparer.GetHashCode (item6); - h = (h << 5) - h + comparer.GetHashCode (item7); - h = (h << 5) - h + comparer.GetHashCode (rest); - return h; + int h0, h1, h2; + h0 = comparer.GetHashCode (item1); + h0 = (h0 << 5) + h0 ^ comparer.GetHashCode (item2); + h1 = comparer.GetHashCode (item3); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item4); + h0 = (h0 << 5) + h0 ^ h1; + h1 = comparer.GetHashCode (item5); + h1 = (h1 << 5) + h1 ^ comparer.GetHashCode (item6); + h2 = comparer.GetHashCode (item7); + h2 = (h2 << 5) + h2 ^ comparer.GetHashCode (rest); + h1 = (h1 << 5) + h1 ^ h2; + h0 = (h0 << 5) + h0 ^ h1; + return h0; + } + + string ITuple.ToString () + { + return String.Format ("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}", item1, item2, item3, item4, item5, item6, item7, ((ITuple)rest).ToString ()); } public override string ToString () { - return String.Format ("({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7})", item1, item2, item3, item4, item5, item6, item7, rest); + return "(" + ((ITuple) this).ToString () + ")"; } } @@ -840,11 +893,11 @@ public class TupleGen Console.WriteLine ("\t[Serializable]"); Console.Write ("\tpublic {0}class ", arity < 8 ? null : "partial "); Console.Write (type_name); - Console.WriteLine (" : IStructuralEquatable, IStructuralComparable, IComparable"); + Console.WriteLine (" : IStructuralEquatable, IStructuralComparable, IComparable, ITuple"); Console.WriteLine ("\t{"); for (int i = 1; i <= arity; ++i) Console.WriteLine ("\t\t{0} {1};", GetItemTypeName (i), GetItemName (i)); - + if (arity < 8) { Console.WriteLine (); Console.Write ("\t\tpublic Tuple ("); @@ -874,17 +927,17 @@ public class TupleGen Console.WriteLine ("\t\t{"); Console.WriteLine ("\t\t\treturn ((IStructuralComparable) this).CompareTo (obj, Comparer.Default);"); Console.WriteLine ("\t\t}"); - + Console.WriteLine (); Console.WriteLine ("\t\tint IStructuralComparable.CompareTo (object other, IComparer comparer)"); Console.WriteLine ("\t\t{"); Console.WriteLine ("\t\t\tvar t = other as {0};", type_name); Console.WriteLine ("\t\t\tif (t == null) {"); Console.WriteLine ("\t\t\t\tif (other == null) return 1;"); - Console.WriteLine ("\t\t\t\tthrow new ArgumentException ("other");"); + Console.WriteLine ("\t\t\t\tthrow new ArgumentException (\"other\");"); Console.WriteLine ("\t\t\t}"); Console.WriteLine (); - + for (int i = 1; i < arity; ++i) { Console.Write ("\t\t\t"); if (i == 1) @@ -894,14 +947,14 @@ public class TupleGen Console.WriteLine ("\t\t\tif (res != 0) return res;"); } Console.WriteLine ("\t\t\treturn comparer.Compare ({0}, t.{0});", GetItemName (arity)); - Console.WriteLine ("\t\t}"); - + Console.WriteLine ("\t\t}"); + Console.WriteLine (); Console.WriteLine ("\t\tpublic override bool Equals (object obj)"); Console.WriteLine ("\t\t{"); Console.WriteLine ("\t\t\treturn ((IStructuralEquatable) this).Equals (obj, EqualityComparer.Default);"); Console.WriteLine ("\t\t}"); - + Console.WriteLine (); Console.WriteLine ("\t\tbool IStructuralEquatable.Equals (object other, IEqualityComparer comparer)"); Console.WriteLine ("\t\t{"); @@ -910,7 +963,7 @@ public class TupleGen Console.WriteLine ("\t\t\t\treturn false;"); Console.WriteLine (); Console.Write ("\t\t\treturn"); - + for (int i = 1; i <= arity; ++i) { if (i == 1) Console.Write (" "); @@ -924,49 +977,91 @@ public class TupleGen Console.WriteLine (";"); } Console.WriteLine ("\t\t}"); - + Console.WriteLine (); Console.WriteLine ("\t\tpublic override int GetHashCode ()"); Console.WriteLine ("\t\t{"); Console.WriteLine ("\t\t\treturn ((IStructuralEquatable) this).GetHashCode (EqualityComparer.Default);"); Console.WriteLine ("\t\t}"); - + Console.WriteLine (); Console.WriteLine ("\t\tint IStructuralEquatable.GetHashCode (IEqualityComparer comparer)"); Console.WriteLine ("\t\t{"); if (arity == 1) { Console.WriteLine ("\t\t\treturn comparer.GetHashCode ({0});", GetItemName (arity)); } else { - Console.WriteLine ("\t\t\tint h = comparer.GetHashCode ({0});", GetItemName (1)); - for (int i = 2; i <= arity; ++i) - Console.WriteLine ("\t\t\th = (h << 5) - h + comparer.GetHashCode ({0});", GetItemName (i)); - Console.WriteLine ("\t\t\treturn h;"); + int varnum = IntLog2 (arity); + Console.Write ("\t\t\tint h0"); + for (int i = 1; i < varnum; ++i) + Console.Write (", h{0}", i); + Console.WriteLine (";"); + + WriteHash (0, 1, arity); + + Console.WriteLine ("\t\t\treturn h0;"); } Console.WriteLine ("\t\t}"); Console.WriteLine (); - Console.WriteLine ("\t\tpublic override string ToString ()"); + Console.WriteLine ("\t\tstring ITuple.ToString ()"); Console.WriteLine ("\t\t{"); - Console.Write ("\t\t\treturn String.Format (\"("); + Console.Write ("\t\t\treturn String.Format (\""); for (int i = 1; i <= arity; ++i) { Console.Write ("{" + (i - 1) + "}"); if (i < arity) Console.Write (", "); } - Console.Write (")\", "); + Console.Write ("\", "); for (int i = 1; i <= arity; ++i) { - Console.Write (GetItemName (i)); + var item_name = GetItemName (i); + Console.Write (i == 8 ? "((ITuple){0}).ToString ()" : "{0}", item_name); if (i < arity) Console.Write (", "); } Console.WriteLine (");"); Console.WriteLine ("\t\t}"); + Console.WriteLine (); + Console.WriteLine ("\t\tpublic override string ToString ()"); + Console.WriteLine ("\t\t{"); + Console.WriteLine ("\t\t\treturn \"(\" + ((ITuple) this).ToString () + \")\";"); + Console.WriteLine ("\t\t}"); + Console.WriteLine ("\t}\n"); } } + static int IntLog2 (int n) + { + int r = -1; + + while (n != 0) { + n >>= 1; + r++; + } + + return r; + } + + static void WriteHash (int destVar, int start, int count) + { + if (count == 1) { + Console.WriteLine ("\t\t\th{0} = comparer.GetHashCode ({1});", destVar, GetItemName (start)); + } else { + int subCount = 1 << IntLog2 (count - 1); + WriteHash (destVar, start, subCount); + start += subCount; + count -= subCount; + if (count == 1) { + Console.WriteLine ("\t\t\th{0} = (h{0} << 5) + h{0} ^ comparer.GetHashCode ({1});", destVar, GetItemName (start)); + } else { + WriteHash (destVar + 1, start, count); + Console.WriteLine ("\t\t\th{0} = (h{0} << 5) + h{0} ^ h{1};", destVar, destVar + 1); + } + } + } + static string GetTypeName (int arity) { StringBuilder sb = new StringBuilder (); @@ -977,19 +1072,20 @@ public class TupleGen sb.Append (", "); } sb.Append (">"); - + return sb.ToString (); } - + static string GetItemName (int arity) { return arity < 8 ? "item" + arity.ToString () : "rest"; } - + static string GetItemTypeName (int arity) { return arity < 8 ? "T" + arity.ToString () : "TRest"; } } + #endif diff --git a/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs b/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs old mode 100644 new mode 100755 index a2c030c0c9..3bffaf3b83 --- a/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs +++ b/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs @@ -2201,6 +2201,8 @@ namespace MonoTests.Microsoft.Win32 } [Test] + // This hangs on windows + [Category ("NotWorking")] public void OpenRemoteBaseKey_MachineName_DoesNotExist () { // access to registry of remote machines is not implemented on unix diff --git a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs index cb5b9f7cf1..9ac58e0fdd 100644 --- a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs +++ b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs @@ -30,8 +30,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 - using System; using System.Collections; using System.Collections.Generic; @@ -286,6 +284,10 @@ namespace MonoTests.System.Collections.Generic { Assert.AreEqual (l1.Count, l1.Capacity); for (int i = 0; i < l1.Count; i++) Assert.AreEqual (_list1 [i], l1 [i]); + + var input = new [] { "a", "b", "c" }; + var l2 = new List(input); + Assert.AreEqual (3, l2.Capacity); } [Test, ExpectedException (typeof (ArgumentNullException))] @@ -555,12 +557,55 @@ namespace MonoTests.System.Collections.Generic { i = _list1.FindIndex (FindMultipleOfTwelve); Assert.AreEqual (-1, i); + + var a = new List () { 2, 2, 2, 3, 2 }; + Assert.AreEqual (2, a.FindIndex (2, 2, l => true)); } - [Test, ExpectedException (typeof (ArgumentNullException))] - public void FindIndexNullTest () + [Test] + public void FindIndex_Invalid () { - int i = _list1.FindIndex (null); + try { + _list1.FindIndex (null); + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + + try { + _list1.FindIndex (-1, l => true); + Assert.Fail ("#2"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindIndex (-1, 0, l => true); + Assert.Fail ("#2b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindIndex (0, -1, l => true); + Assert.Fail ("#3"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindIndex (100, l => true); + Assert.Fail ("#4"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindIndex (100, 0, l => true); + Assert.Fail ("#4b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindIndex (7, 2, l => true); + Assert.Fail ("#5"); + } catch (ArgumentOutOfRangeException) { + } } [Test] @@ -579,8 +624,6 @@ namespace MonoTests.System.Collections.Generic { int i = _list1.FindLast (null); } - // FIXME currently generates Invalid IL Code error - /* [Test] public void ForEachTest () { @@ -589,7 +632,7 @@ namespace MonoTests.System.Collections.Generic { Assert.AreEqual (418, i); } - */ + [Test] public void FindLastIndexTest () { @@ -601,12 +644,56 @@ namespace MonoTests.System.Collections.Generic { i = _list1.FindIndex (FindMultipleOfTwelve); Assert.AreEqual (-1, i); + + Assert.AreEqual (2, _list1.FindLastIndex (2, 3, l => true)); + Assert.AreEqual (2, _list1.FindLastIndex (2, 2, l => true)); + Assert.AreEqual (1, _list1.FindLastIndex (1, 2, l => true)); } - [Test, ExpectedException (typeof (ArgumentNullException))] - public void FindLastIndexNullTest () + [Test] + public void FindLastIndex_Invalid () { - int i = _list1.FindLastIndex (null); + try { + _list1.FindLastIndex (null); + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + + try { + _list1.FindLastIndex (-1, l => true); + Assert.Fail ("#2"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindLastIndex (-1, 0, l => true); + Assert.Fail ("#2b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindLastIndex (0, -1, l => true); + Assert.Fail ("#3"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindLastIndex (100, l => true); + Assert.Fail ("#4"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindLastIndex (100, 0, l => true); + Assert.Fail ("#4b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + _list1.FindLastIndex (2, 4, l => true); + Assert.Fail ("#5"); + } catch (ArgumentOutOfRangeException) { + } } [Test] @@ -1464,5 +1551,4 @@ namespace MonoTests.System.Collections.Generic { } } -#endif diff --git a/mcs/class/corlib/Test/System.Diagnostics/DebuggerDisplayAttributeTest.cs b/mcs/class/corlib/Test/System.Diagnostics/DebuggerDisplayAttributeTest.cs index 3dbcccdf29..5564e47a36 100644 --- a/mcs/class/corlib/Test/System.Diagnostics/DebuggerDisplayAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Diagnostics/DebuggerDisplayAttributeTest.cs @@ -1,5 +1,5 @@ // -// MonoTests.System.Diagnostics.DebuggerDisplayAttributeTest.cs +// DebuggerDisplayAttributeTest.cs // // Author: // Rolf Bjarne Kvinge (RKvinge@novell.com) @@ -7,8 +7,6 @@ // (C) 2007 // -#if NET_2_0 - using System; using System.Diagnostics; using NUnit.Framework; @@ -172,5 +170,3 @@ namespace MonoTests.System.Diagnostics } } } - -#endif \ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Diagnostics/DebuggerTypeProxyAttribute.cs b/mcs/class/corlib/Test/System.Diagnostics/DebuggerTypeProxyAttribute.cs new file mode 100644 index 0000000000..bd3297d3cb --- /dev/null +++ b/mcs/class/corlib/Test/System.Diagnostics/DebuggerTypeProxyAttribute.cs @@ -0,0 +1,56 @@ +// +// DecoupledTask.cs +// +// Authors: +// Marek Safar +// +// Copyright 2013 Xamarin Inc (http://www.xamarin.com). +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// + +using System; +using System.Diagnostics; +using NUnit.Framework; + +namespace MonoTests.System.Diagnostics +{ + [TestFixture] + public class DebuggerTypeProxyAttributeTest + { + [Test] + public void Constructor_Type () + { + var dtp = new DebuggerTypeProxyAttribute (typeof (string)); + Assert.IsNull (dtp.Target, "#1"); + Assert.AreEqual (typeof (string).AssemblyQualifiedName, dtp.ProxyTypeName, "#2"); + } + + [Test] + public void Constructor_Type_Invalid () + { + try { + new DebuggerTypeProxyAttribute (null as Type); + Assert.Fail (); + } catch (ArgumentNullException) { + } + } + } +} diff --git a/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs b/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs index 033cc08539..0f7646b036 100644 --- a/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs +++ b/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs @@ -42,6 +42,7 @@ namespace MonoTests.System.Diagnostics /// Tests whether getting file name works. /// [Test] + [Category("LLVMNotWorking")] public void TestGetFileName () { Assert.AreEqual ("dir/someFile", @@ -57,6 +58,7 @@ namespace MonoTests.System.Diagnostics /// Tests whether getting file line number works. /// [Test] + [Category("LLVMNotWorking")] public void TestGetFileLineNumber () { Assert.AreEqual (13, @@ -152,6 +154,7 @@ namespace MonoTests.System.Diagnostics } [Test] + [Category ("LLVMNotWorking")] public void TestGetFileName2 () { Assert.IsNotNull (frame2.GetFileName (), "File name not null"); @@ -164,13 +167,14 @@ namespace MonoTests.System.Diagnostics /// Tests whether getting file line number works. /// [Test] + [Category ("LLVMNotWorking")] public void TestGetFileLineNumber () { Assert.AreEqual (0, frame1.GetFileLineNumber (), "Line number (1)"); - Assert.AreEqual (132, + Assert.AreEqual (134, frame2.GetFileLineNumber (), "Line number (2)"); @@ -280,6 +284,7 @@ namespace MonoTests.System.Diagnostics /// Tests whether getting file name works. /// [Test] + [Category ("LLVMNotWorking")] public void TestGetFileName () { Assert.IsNull (frame1.GetFileName (), @@ -299,13 +304,14 @@ namespace MonoTests.System.Diagnostics #if ONLY_1_1 [Category ("NotDotNet")] // .NET 1.1 is off by one #endif + [Category ("LLVMNotWorking")] public void TestGetFileLineNumber () { Assert.AreEqual (0, frame1.GetFileLineNumber (), "Line number (1)"); - Assert.AreEqual (260, + Assert.AreEqual (264, frame2.GetFileLineNumber (), "Line number (2)"); } diff --git a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs index 7714f53ab3..45fd5d0e99 100644 --- a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs @@ -599,5 +599,122 @@ namespace MonoTests.System.Globalization // https://bugzilla.xamarin.com/show_bug.cgi?id=3471 new CultureInfo ("en-HK"); } + +#if NET_4_5 + CountdownEvent barrier = new CountdownEvent (3); + AutoResetEvent[] evt = new AutoResetEvent [] { new AutoResetEvent (false), new AutoResetEvent (false), new AutoResetEvent (false)}; + + CultureInfo[] initial_culture = new CultureInfo[3]; + CultureInfo[] changed_culture = new CultureInfo[3]; + CultureInfo[] changed_culture2 = new CultureInfo[3]; + CultureInfo alternative_culture = new CultureInfo("pt-BR"); + + void StepAllPhases (int index) + { + initial_culture [index] = CultureInfo.CurrentCulture; + /*Phase 1 - we witness the original value */ + barrier.Signal (); + + /*Phase 2 - main thread changes culture */ + evt [index].WaitOne (); + + /*Phase 3 - we witness the new value */ + changed_culture [index] = CultureInfo.CurrentCulture; + barrier.Signal (); + + /* Phase 4 - main thread changes culture back */ + evt [index].WaitOne (); + + /*Phase 5 - we witness the new value */ + changed_culture2 [index] = CultureInfo.CurrentCulture; + barrier.Signal (); + } + + void ThreadWithoutChange () { + StepAllPhases (0); + } + + void ThreadWithChange () { + Thread.CurrentThread.CurrentCulture = alternative_culture; + StepAllPhases (1); + } + + void ThreadPoolWithoutChange () { + StepAllPhases (2); + } + + [Test] + public void DefaultThreadCurrentCulture () { + var orig_culture = CultureInfo.CurrentCulture; + var new_culture = new CultureInfo("fr-FR"); + + // The test doesn't work if the current culture is already set + if (orig_culture != CultureInfo.InvariantCulture) + return; + + /* Phase 0 - warm up */ + new Thread (ThreadWithoutChange).Start (); + new Thread (ThreadWithChange).Start (); + Action x = ThreadPoolWithoutChange; + x.BeginInvoke (null, null); + + /* Phase 1 - let everyone witness initial values */ + initial_culture [0] = CultureInfo.CurrentCulture; + barrier.Wait (); + barrier.Reset (); + + /* Phase 2 - change the default culture*/ + CultureInfo.DefaultThreadCurrentCulture = new_culture; + evt [0].Set (); + evt [1].Set (); + evt [2].Set (); + /* Phase 3 - let everyone witness the new value */ + changed_culture [0] = CultureInfo.CurrentCulture; + barrier.Wait (); + barrier.Reset (); + + /* Phase 4 - revert the default culture back to null */ + CultureInfo.DefaultThreadCurrentCulture = null; + evt [0].Set (); + evt [1].Set (); + evt [2].Set (); + + /* Phase 5 - let everyone witness the new value */ + changed_culture2 [0] = CultureInfo.CurrentCulture; + barrier.Wait (); + barrier.Reset (); + + CultureInfo.DefaultThreadCurrentCulture = null; + + Assert.AreEqual (orig_culture, initial_culture [0], "#2"); + Assert.AreEqual (alternative_culture, initial_culture [1], "#3"); + Assert.AreEqual (orig_culture, initial_culture [2], "#4"); + + Assert.AreEqual (new_culture, changed_culture [0], "#6"); + Assert.AreEqual (alternative_culture, changed_culture [1], "#7"); + Assert.AreEqual (new_culture, changed_culture [2], "#8"); + + Assert.AreEqual (orig_culture, changed_culture2 [0], "#10"); + Assert.AreEqual (alternative_culture, changed_culture2 [1], "#11"); + Assert.AreEqual (orig_culture, changed_culture2 [2], "#12"); + } + + [Test] + public void DefaultThreadCurrentCultureAndNumberFormaters () { + string us_str = null; + string br_str = null; + var thread = new Thread (() => { + CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US"); + us_str = 100000.ToString ("C"); + CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("pt-BR"); + br_str = 100000.ToString ("C"); + }); + thread.Start (); + thread.Join (); + CultureInfo.DefaultThreadCurrentCulture = null; + Assert.AreEqual ("$100,000.00", us_str, "#1"); + Assert.AreEqual ("R$ 100.000,00", br_str, "#2"); + } +#endif } } diff --git a/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs index d3d388f670..e0230b788a 100644 --- a/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs @@ -94,11 +94,11 @@ namespace MonoTests.System.Globalization { CultureInfo ci = new CultureInfo ("es-ES"); DateTimeFormatInfo di = ci.DateTimeFormat; - Assert.AreEqual ("dddd, dd' de 'MMMM' de 'yyyy", di.LongDatePattern, "#1"); + Assert.AreEqual ("dddd, d' de 'MMMM' de 'yyyy", di.LongDatePattern, "#1"); Assert.AreEqual ("H:mm:ss", di.LongTimePattern, "#2"); - Assert.AreEqual ("dddd, dd' de 'MMMM' de 'yyyy H:mm:ss", di.FullDateTimePattern, "#3"); + Assert.AreEqual ("dddd, d' de 'MMMM' de 'yyyy H:mm:ss", di.FullDateTimePattern, "#3"); Assert.AreEqual ("MMMM' de 'yyyy", di.YearMonthPattern, "#4"); - Assert.AreEqual ("dd MMMM", di.MonthDayPattern, "#5"); + Assert.AreEqual ("d' de 'MMMM", di.MonthDayPattern, "#5"); } [Test] diff --git a/mcs/class/corlib/Test/System.Globalization/NumberFormatInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/NumberFormatInfoTest.cs new file mode 100644 index 0000000000..a195c28f72 --- /dev/null +++ b/mcs/class/corlib/Test/System.Globalization/NumberFormatInfoTest.cs @@ -0,0 +1,57 @@ +// +// NumberFormatInfoTest.cs +// +// Authors: +// Marek Safar (marek.safar@gmail.com) +// +// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + + +using NUnit.Framework; +using System; +using System.Globalization; + +namespace MonoTests.System.Globalization +{ + [TestFixture] + public class NumberFormatInfoTest + { + [Test] + public void CurrencyDecimalDigits () + { + CultureInfo c; + + c = CultureInfo.GetCultureInfo ("id-ID"); + Assert.AreEqual (0, c.NumberFormat.CurrencyDecimalDigits, "#1"); + + c = CultureInfo.GetCultureInfo ("is-IS"); + Assert.AreEqual (0, c.NumberFormat.CurrencyDecimalDigits, "#2"); + + c = CultureInfo.InvariantCulture; + Assert.AreEqual (2, c.NumberFormat.CurrencyDecimalDigits, "#3"); + + } + } +} + + diff --git a/mcs/class/corlib/Test/System.Globalization/TextInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/TextInfoTest.cs index 5113cc5e98..9629dacf4b 100644 --- a/mcs/class/corlib/Test/System.Globalization/TextInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/TextInfoTest.cs @@ -24,10 +24,11 @@ public class TextInfoTest { { TextInfo ti = new CultureInfo ("en-US", false).TextInfo; - Assert.AreEqual (" The Dog", ti.ToTitleCase (" the dog")); - Assert.AreEqual (" The Dude", ti.ToTitleCase (" The Dude")); - Assert.AreEqual ("La Guerra Yla Paz", ti.ToTitleCase ("la Guerra yLa pAz")); - Assert.AreEqual ("\tTab\tAnd\tPeace", ti.ToTitleCase ("\ttab\taNd\tpeaCE")); + Assert.AreEqual (" The Dog", ti.ToTitleCase (" the dog"), "#1"); + Assert.AreEqual (" The Dude", ti.ToTitleCase (" The Dude"), "#2"); + Assert.AreEqual ("La Guerra Yla Paz", ti.ToTitleCase ("la Guerra yLa pAz"), "#3"); + Assert.AreEqual ("\tTab\tAnd\tPeace", ti.ToTitleCase ("\ttab\taNd\tpeaCE"), "#4"); + Assert.AreEqual ("This_Is\uFE58A\u0095String\u06D4With\uFE33Separators", ti.ToTitleCase ("this_is\uFE58a\u0095string\u06D4with\uFE33separators"), "#5"); } [Test] diff --git a/mcs/class/corlib/Test/System.IO/FileTest.cs b/mcs/class/corlib/Test/System.IO/FileTest.cs index 6267439aed..112978ae8b 100644 --- a/mcs/class/corlib/Test/System.IO/FileTest.cs +++ b/mcs/class/corlib/Test/System.IO/FileTest.cs @@ -2760,5 +2760,53 @@ namespace MonoTests.System.IO } } #endif + + void MoveTest (FileAccess acc, FileShare share, bool works) + { + var file = "kk597rfdnllh89"; + + File.Delete (file + ".old"); + using (var v = File.Create (file)) { } + + using (var stream = new FileStream(file, FileMode.Open, acc, share, 4096, FileOptions.SequentialScan)) { + try { + File.Move(file, file + ".old"); + if (!works) + Assert.Fail ("Move with ({0}) and ({1}) did not fail", acc, share); + } catch (IOException) { + if (works) + Assert.Fail ("Move with ({0}) and ({1}) did fail", acc, share); + } + } + } + + [Test] + public void MoveTest () + { + MoveTest (FileAccess.Read, FileShare.None, false); + MoveTest (FileAccess.Read, FileShare.Read, false); + MoveTest (FileAccess.Read, FileShare.Write, false); + MoveTest (FileAccess.Read, FileShare.ReadWrite, false); + MoveTest (FileAccess.Read, FileShare.Delete, true); + MoveTest (FileAccess.Read, FileShare.Read | FileShare.Delete, true); + MoveTest (FileAccess.Read, FileShare.Write | FileShare.Delete, true); + MoveTest (FileAccess.Read, FileShare.ReadWrite | FileShare.Delete, true); + MoveTest (FileAccess.Write, FileShare.None, false); + MoveTest (FileAccess.Write, FileShare.Read, false); + MoveTest (FileAccess.Write, FileShare.Write, false); + MoveTest (FileAccess.Write, FileShare.ReadWrite, false); + MoveTest (FileAccess.Write, FileShare.Delete, true); + MoveTest (FileAccess.Write, FileShare.Read | FileShare.Delete, true); + MoveTest (FileAccess.Write, FileShare.Write | FileShare.Delete, true); + MoveTest (FileAccess.Write, FileShare.ReadWrite | FileShare.Delete, true); + MoveTest (FileAccess.ReadWrite, FileShare.None, false); + MoveTest (FileAccess.ReadWrite, FileShare.Read, false); + MoveTest (FileAccess.ReadWrite, FileShare.Write, false); + MoveTest (FileAccess.ReadWrite, FileShare.ReadWrite, false); + MoveTest (FileAccess.ReadWrite, FileShare.Delete, true); + MoveTest (FileAccess.ReadWrite, FileShare.Read | FileShare.Delete, true); + MoveTest (FileAccess.ReadWrite, FileShare.Write | FileShare.Delete, true); + MoveTest (FileAccess.ReadWrite, FileShare.ReadWrite | FileShare.Delete, true); + } } } diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs index 692a735950..7953d46250 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs @@ -11074,5 +11074,53 @@ namespace MonoTests.System.Reflection.Emit Activator.CreateInstance (t, new object[] { "string"}); } + public interface IFace16096 { + object Bar (); + } + + [Test] + public void MemberRef_Caching_16096 () { + var outer_class = module.DefineType( + "container", + TypeAttributes.Class | TypeAttributes.Public, + typeof(object)); + + var builder = outer_class.DefineNestedType( + "bind@32-1", + TypeAttributes.Class | TypeAttributes.Public, + typeof(object)); + + builder.AddInterfaceImplementation (typeof (IFace16096)); + + var ctor = builder.DefineDefaultConstructor (MethodAttributes.Public); + var field = builder.DefineField ("Field", typeof (object), FieldAttributes.Public); + var g_args = builder.DefineGenericParameters("b","a"); + var method = builder.DefineMethod ("Bar", MethodAttributes.Public | MethodAttributes.Virtual, typeof (object), new Type [0]); + + var il = method.GetILGenerator(); + il.Emit (OpCodes.Ldarg_0); + il.Emit (OpCodes.Ldfld, TypeBuilder.GetField (builder.MakeGenericType (g_args), field)); + il.Emit (OpCodes.Pop); + il.Emit (OpCodes.Newobj, TypeBuilder.GetConstructor (builder.MakeGenericType (g_args), ctor)); + il.Emit (OpCodes.Ret); + + var type = builder.CreateType (); + + /*Build a gshared instance. */ + var ginst = type.MakeGenericType (typeof (List), typeof (object)); + var ins = (IFace16096)Activator.CreateInstance (ginst); + + /* This will trigger the runtime to cache the MEMBER_REF to the .ctor as it won't have a context. */ + var ins2 = ins.Bar (); + Assert.IsNotNull (ins2); + + /* Build an unsharable version. */ + var ginst2 = type.MakeGenericType (typeof (List), typeof (char)); + var ins3 = (IFace16096)Activator.CreateInstance (ginst2); + + /* This will trigger the runtime to use the cached version, which is wrong as it's an open type. */ + var ins4 = ins3.Bar (); + Assert.IsNotNull (ins4); + } } } diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs index fc36438b45..0e26ea1770 100644 --- a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs @@ -1177,9 +1177,7 @@ public class AssemblyNameTest { Assert.AreEqual (an.HashAlgorithm, clone.HashAlgorithm, "HashAlgorithm"); Assert.AreEqual (an.KeyPair, clone.KeyPair, "KeyPair"); Assert.AreEqual (an.Name, clone.Name, "Name"); -#if NET_2_0 - Assert.AreEqual (an.ProcessorArchitecture, clone.ProcessorArchitecture, "PA"); -#endif + //Assert.AreEqual (an.ProcessorArchitecture, clone.ProcessorArchitecture, "PA"); Assert.AreEqual (an.Version, clone.Version, "Version"); Assert.AreEqual (an.VersionCompatibility, clone.VersionCompatibility, "VersionCompatibility"); Assert.AreEqual (an.GetPublicKey (), clone.GetPublicKey (), "GetPublicKey"); diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs index ff1d915632..b22f46f365 100644 --- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs @@ -98,6 +98,15 @@ namespace MonoTests.System.Reflection Assert.AreEqual (ParamEnum.Foo, info [5].DefaultValue, "#2"); } +#if NET_4_5 + [Test] + public void HasDefaultValueEnum () { + ParameterInfo[] info = typeof (ParameterInfoTest).GetMethod ("paramMethod").GetParameters (); + + Assert.IsTrue (info [5].HasDefaultValue); + } +#endif + public static void Sample2 ([DecimalConstantAttribute(2,2,2,2,2)] decimal a, [DateTimeConstantAttribute(123456)] DateTime b) {} [Test] @@ -117,7 +126,19 @@ namespace MonoTests.System.Reflection Assert.AreEqual (pi [1].DefaultValue.GetType (), typeof (Missing), "#2"); } - public void Sample (int a, [Optional] int b) +#if NET_4_5 + [Test] + public void TestHasDefaultValues () + { + ParameterInfo [] pi = typeof (ParameterInfoTest).GetMethod ("Sample").GetParameters (); + + Assert.IsFalse (pi [0].HasDefaultValue, "#1"); + Assert.IsFalse (pi [1].HasDefaultValue, "#2"); + Assert.IsTrue (pi [2].HasDefaultValue, "#3"); + } +#endif + + public void Sample (int a, [Optional] int b, object c = null) { } @@ -235,6 +256,14 @@ namespace MonoTests.System.Reflection Assert.AreEqual (decimal.MaxValue, info [0].DefaultValue); } +#if NET_4_5 + [Test] + public void HasDefaultValueDecimal () { + var info = typeof (ParameterInfoTest).GetMethod ("TestC").GetParameters (); + Assert.IsTrue (info [0].HasDefaultValue); + } +#endif + class MyParameterInfo2 : ParameterInfo { public ParameterAttributes MyAttrsImpl; diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs index 48f629adfa..18b2099b8d 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs @@ -33,12 +33,45 @@ using System.Threading; using System.Threading.Tasks; using NUnit.Framework; using System.Runtime.CompilerServices; +using System.Collections.Generic; namespace MonoTests.System.Runtime.CompilerServices { [TestFixture] public class TaskAwaiterTest { + class Scheduler : TaskScheduler + { + string name; + + public Scheduler (string name) + { + this.name = name; + } + + public int InlineCalls { get; set; } + public int QueueCalls { get; set; } + + protected override IEnumerable GetScheduledTasks () + { + throw new NotImplementedException (); + } + + protected override void QueueTask (Task task) + { + ++QueueCalls; + ThreadPool.QueueUserWorkItem (o => { + TryExecuteTask (task); + }); + } + + protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) + { + ++InlineCalls; + return false; + } + } + [Test] public void GetResultFaulted () { @@ -85,6 +118,72 @@ namespace MonoTests.System.Runtime.CompilerServices awaiter.GetResult (); Assert.AreEqual (TaskStatus.RanToCompletion, task.Status); } + + [Test] + public void CustomScheduler () + { + // some test runners (e.g. Touch.Unit) will execute this on the main thread and that would lock them + if (!Thread.CurrentThread.IsBackground) + return; + + var a = new Scheduler ("a"); + var b = new Scheduler ("b"); + + var t = TestCS (a, b); + Assert.IsTrue (t.Wait (3000), "#0"); + Assert.AreEqual (0, t.Result, "#1"); + Assert.AreEqual (1, a.InlineCalls, "#2a"); + Assert.AreEqual (0, b.InlineCalls, "#2b"); + Assert.AreEqual (2, a.QueueCalls, "#3a"); + Assert.AreEqual (1, b.QueueCalls, "#3b"); + } + + static async Task TestCS (TaskScheduler schedulerA, TaskScheduler schedulerB) + { + var res = await Task.Factory.StartNew (async () => { + if (TaskScheduler.Current != schedulerA) + return 1; + + await Task.Factory.StartNew ( + () => { + if (TaskScheduler.Current != schedulerB) + return 2; + + return 0; + }, CancellationToken.None, TaskCreationOptions.None, schedulerB); + + if (TaskScheduler.Current != schedulerA) + return 3; + + return 0; + }, CancellationToken.None, TaskCreationOptions.None, schedulerA); + + return res.Result; + } + + [Test] + public void FinishedTaskOnCompleted () + { + var mres = new ManualResetEvent (false); + var mres2 = new ManualResetEvent (false); + + var tcs = new TaskCompletionSource (); + tcs.SetResult (null); + var task = tcs.Task; + + var awaiter = task.GetAwaiter (); + Assert.IsTrue (awaiter.IsCompleted, "#1"); + + awaiter.OnCompleted(() => { + if (mres.WaitOne (1000)) + mres2.Set (); + }); + + mres.Set (); + // this will only terminate correctly if the test was not executed from the main thread + // e.g. Touch.Unit defaults to run tests on the main thread and this will return false + Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");; + } } } diff --git a/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs b/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs index d3a1e2de3c..4c84824c91 100644 --- a/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs +++ b/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs @@ -213,9 +213,6 @@ namespace MonoTests.System.Security.Principal { } [Test] -#if __IOS__ - [Ignore ("https://bugzilla.xamarin.com/show_bug.cgi?id=12789")] -#endif public void SerializeRoundTrip () { WindowsIdentity wi = WindowsIdentity.GetCurrent (); diff --git a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs index 1f53af7e3e..91a465c13d 100644 --- a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs +++ b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs @@ -125,34 +125,36 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 - [Category ("NotWorking")] -#endif public void TestMaxCharCount() { UTF8Encoding UTF8enc = new UTF8Encoding (); -#if NET_2_0 - // hmm, where is this extra 1 coming from? + Encoding UTF8encWithBOM = new UTF8Encoding(true); Assert.AreEqual (51, UTF8enc.GetMaxCharCount(50), "UTF #1"); -#else - Assert.AreEqual (50, UTF8enc.GetMaxCharCount(50), "UTF #1"); -#endif + Assert.AreEqual (UTF8enc.GetMaxByteCount(50), UTF8encWithBOM.GetMaxByteCount(50), "UTF #2"); + } + + [Test] + public void TestMaxCharCountWithCustomFallback() + { + Encoding encoding = Encoding.GetEncoding("utf-8", new EncoderReplacementFallback("\u2047\u2047"), new DecoderReplacementFallback("\u2047\u2047")); + Assert.AreEqual (102, encoding.GetMaxCharCount(50), "UTF #1"); } [Test] -#if NET_2_0 - [Category ("NotWorking")] -#endif public void TestMaxByteCount() { UTF8Encoding UTF8enc = new UTF8Encoding (); -#if NET_2_0 - // maybe under .NET 2.0 insufficient surrogate pair is - // just not handled, and 3 is Preamble size. + Encoding UTF8encWithBOM = new UTF8Encoding(true); + Assert.AreEqual (153, UTF8enc.GetMaxByteCount(50), "UTF #1"); -#else - Assert.AreEqual (200, UTF8enc.GetMaxByteCount(50), "UTF #1"); -#endif + Assert.AreEqual (UTF8enc.GetMaxByteCount(50), UTF8encWithBOM.GetMaxByteCount(50), "UTF #2"); + } + + [Test] + public void TestMaxByteCountWithCustomFallback() + { + Encoding encoding = Encoding.GetEncoding("utf-8", new EncoderReplacementFallback("\u2047\u2047"), new DecoderReplacementFallback("?")); + Assert.AreEqual (306, encoding.GetMaxByteCount(50), "UTF #1"); } // regression for bug #59648 diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs index 16db84cb41..857841e326 100644 --- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs +++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs @@ -281,6 +281,16 @@ namespace MonoTests.System.Threading.Tasks t2.Set (); } + [Test] + public void ContinueWhenAny_WithResult () + { + var tcs = new TaskCompletionSource(); + tcs.SetResult(1); + Task[] tasks = new[] { tcs.Task }; + var res = Task.Factory.ContinueWhenAny (tasks, l => 4); + Assert.AreEqual (4, res.Result); + } + [Test] public void ContinueWhenAny_InvalidArguments () { @@ -594,16 +604,24 @@ namespace MonoTests.System.Threading.Tasks [Test] public void StartNewCancelled () { - var cts = new CancellationTokenSource (); - cts.Cancel (); + var ct = new CancellationToken (true); - var task = factory.StartNew (() => Assert.Fail ("Should never be called"), cts.Token); + var task = factory.StartNew (() => Assert.Fail ("Should never be called"), ct); try { task.Start (); + Assert.Fail ("#1"); } catch (InvalidOperationException) { } Assert.IsTrue (task.IsCanceled, "#2"); + + task = factory.StartNew (() => { }, ct); + try { + task.Wait (); + } catch (AggregateException e) { + Assert.IsTrue (task.IsCanceled, "#3"); + Assert.That (e.InnerException, Is.TypeOf (typeof (TaskCanceledException)), "#4"); + } } } } diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest_T.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest_T.cs index 0c30a093b0..ff964bb9cf 100644 --- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest_T.cs +++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest_T.cs @@ -33,6 +33,9 @@ using System.Threading; using System.Threading.Tasks; using NUnit.Framework; +#if !MOBILE +using NUnit.Framework.SyntaxHelpers; +#endif namespace MonoTests.System.Threading.Tasks { @@ -249,6 +252,29 @@ namespace MonoTests.System.Threading.Tasks Assert.AreEqual ("1", task.Result, "#2"); } + [Test] + public void StartNewCancelled () + { + var ct = new CancellationToken (true); + var factory = new TaskFactory (); + + var task = factory.StartNew (() => { Assert.Fail ("Should never be called"); return 1; }, ct); + try { + task.Start (); + Assert.Fail ("#1"); + } catch (InvalidOperationException) { + } + + Assert.IsTrue (task.IsCanceled, "#2"); + + task = factory.StartNew (() => 1, ct); + try { + task.Wait (); + } catch (AggregateException e) { + Assert.IsTrue (task.IsCanceled, "#3"); + Assert.That (e.InnerException, Is.TypeOf (typeof (TaskCanceledException)), "#4"); + } + } } } diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs index d9811306fb..1f3c156d77 100644 --- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs +++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs @@ -837,6 +837,23 @@ namespace MonoTests.System.Threading.Tasks } } + [Test] + public void RunSynchronously_SchedulerException () + { + var scheduler = new MockScheduler (); + scheduler.TryExecuteTaskInlineHandler += (task, b) => { + throw new ApplicationException (); + }; + + Task t = new Task (() => { }); + try { + t.RunSynchronously (scheduler); + Assert.Fail (); + } catch (Exception e) { + Assert.AreEqual (t.Exception.InnerException, e); + } + } + [Test] public void RunSynchronouslyWithAttachedChildren () { @@ -1125,6 +1142,15 @@ namespace MonoTests.System.Threading.Tasks } } + [Test] + public void Delay_TimeManagement () + { + var delay1 = Task.Delay(50); + var delay2 = Task.Delay(25); + Assert.IsTrue (Task.WhenAny(new[] { delay1, delay2 }).Wait (1000)); + Assert.AreEqual (TaskStatus.RanToCompletion, delay2.Status); + } + [Test] public void WaitAny_WithNull () { @@ -1140,6 +1166,16 @@ namespace MonoTests.System.Threading.Tasks } } + [Test] + public void WhenAll_Empty () + { + var tasks = new Task[0]; + + Task t = Task.WhenAll(tasks); + + Assert.IsTrue(t.Wait(1000), "#1"); + } + [Test] public void WhenAll_WithNull () { @@ -1265,6 +1301,18 @@ namespace MonoTests.System.Threading.Tasks Assert.IsTrue (t.Wait (1000), "#2"); } + [Test] + public void WhenAllResult_Empty () + { + var tasks = new Task[0]; + + Task t = Task.WhenAll(tasks); + + Assert.IsTrue(t.Wait(1000), "#1"); + Assert.IsNotNull(t.Result, "#2"); + Assert.AreEqual(t.Result.Length, 0, "#3"); + } + [Test] public void WhenAllResult_WithNull () { diff --git a/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs b/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs index 6f9c23fc5f..df0a77631c 100644 --- a/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs +++ b/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs @@ -66,6 +66,8 @@ namespace MonoTests.System.Threading } [Test] // bug #81529 + // Causes a Attempting to unref unused handle 0x2 warning + [Category ("NotWorking")] public void Handle_Valid () { AutoResetEvent are1 = new AutoResetEvent (false); diff --git a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs index 644d0c5049..24534c3fd8 100644 --- a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs +++ b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs @@ -131,6 +131,20 @@ namespace MonoTests.System.Threading } + [Test] + public void Cancel_Order () + { + var cts = new CancellationTokenSource (); + var current = 0; + Action a = x => { Assert.AreEqual(current, x); current++; }; + + cts.Token.Register (a, 2); + cts.Token.Register (a, 1); + cts.Token.Register (a, 0); + cts.Cancel (); + } + + [Test] public void CancelWithDispose () { @@ -192,6 +206,25 @@ namespace MonoTests.System.Threading cts.Cancel (); } + [Test] + public void Cancel_ExceptionOrder () + { + var cts = new CancellationTokenSource (); + + cts.Token.Register (() => { throw new ApplicationException ("1"); }); + cts.Token.Register (() => { throw new ApplicationException ("2"); }); + cts.Token.Register (() => { throw new ApplicationException ("3"); }); + + try { + cts.Cancel (); + } catch (AggregateException e) { + Assert.AreEqual (3, e.InnerExceptions.Count, "#2"); + Assert.AreEqual ("3", e.InnerExceptions[0].Message, "#3"); + Assert.AreEqual ("2", e.InnerExceptions[1].Message, "#4"); + Assert.AreEqual ("1", e.InnerExceptions[2].Message, "#5"); + } + } + [Test] public void Cancel_MultipleException_Recursive () { @@ -375,10 +408,9 @@ namespace MonoTests.System.Threading var source = new CancellationTokenSource (); var token = source.Token; - var reg = new CancellationTokenRegistration (); Console.WriteLine ("Test1"); + var reg = token.Register (() => unregister = true); token.Register (() => reg.Dispose ()); - reg = token.Register (() => unregister = true); token.Register (() => { Console.WriteLine ("Gnyah"); token.Register (() => register = true); }); source.Cancel (); diff --git a/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs b/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs index 9e79512002..2fa3d91a04 100644 --- a/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs @@ -67,6 +67,66 @@ namespace MonoTests.System.Threading { { if (ExecutionContext.IsFlowSuppressed ()) ExecutionContext.RestoreFlow (); + + CallContext.FreeNamedDataSlot ("testlc"); + } + + [Test] + [Category("MobileNotWorking")] + public void LogicalGetData_SetData() + { + var value = "a"; + + CallContext.SetData ("testlc", value); + var capturedValue = CallContext.LogicalGetData ("testlc"); + + Assert.IsNull (capturedValue); + } + + [Test] + [Category("MobileNotWorking")] + public void LogicalGetData_SetDataLogicalThreadAffinative() + { + var value = new CallContextValue ("a"); + + CallContext.SetData ("testlc", value); + var capturedValue = CallContext.LogicalGetData ("testlc"); + + Assert.AreEqual (value, capturedValue); + } + + [Test] + [Category("MobileNotWorking")] + public void GetData_SetLogicalData() + { + var value = "a"; + + CallContext.LogicalSetData ("testlc", value); + var capturedValue = CallContext.GetData ("testlc"); + + Assert.AreEqual (value, capturedValue); + } + + [Test] + [Category("MobileNotWorking")] + public void CaptureLogicalCallContext() + { + var value = "Tester"; + object capturedValue = null; + + CallContext.LogicalSetData ("testlc", value); + + ExecutionContext ec = ExecutionContext.Capture (); + Assert.IsNotNull (ec, "Capture"); + Assert.AreEqual (value, CallContext.LogicalGetData ("testlc")); + CallContext.LogicalSetData ("testlc", null); + + ExecutionContext.Run (ec, new ContextCallback (new Action ((data) => { + capturedValue = CallContext.LogicalGetData ("testlc"); + })), null); + + Assert.AreEqual (value, capturedValue); + Assert.AreNotEqual (value, CallContext.LogicalGetData ("testlc")); } [Test] @@ -92,6 +152,7 @@ namespace MonoTests.System.Threading { } [Test] + [Category("MobileNotWorking")] public void Capture () { ExecutionContext ec = ExecutionContext.Capture (); @@ -109,6 +170,7 @@ namespace MonoTests.System.Threading { } [Test] + [Category("MobileNotWorking")] public void Copy () { ExecutionContext ec = ExecutionContext.Capture (); @@ -138,6 +200,7 @@ namespace MonoTests.System.Threading { } [Test] + [Category("MobileNotWorking")] public void IsFlowSuppressed () { Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1"); @@ -151,12 +214,14 @@ namespace MonoTests.System.Threading { [Test] [ExpectedException (typeof (InvalidOperationException))] + [Category("MobileNotWorking")] public void RestoreFlow_None () { ExecutionContext.RestoreFlow (); } [Test] + [Category("MobileNotWorking")] public void RestoreFlow_SuppressFlow () { Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1"); @@ -177,6 +242,7 @@ namespace MonoTests.System.Threading { [Test] [ExpectedException (typeof (InvalidOperationException))] + [Category("MobileNotWorking")] public void Run_SuppressFlow () { Assert.IsFalse (ExecutionContext.IsFlowSuppressed ()); @@ -191,6 +257,7 @@ namespace MonoTests.System.Threading { } [Test] + [Category("MobileNotWorking")] public void SuppressFlow () { Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1"); @@ -204,6 +271,7 @@ namespace MonoTests.System.Threading { [Test] [ExpectedException (typeof (InvalidOperationException))] + [Category("MobileNotWorking")] public void SuppressFlow_Two_Undo () { Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1"); diff --git a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs index 951e41ee1a..88803e5c2d 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs @@ -49,6 +49,37 @@ namespace MonoTests.System.Threading Assert.Fail ("#2"); } catch (ArgumentNullException) { } - } + } + + [Test] + public void UnsafeQueueUserWorkItem_InvalidArguments () + { + try { + ThreadPool.UnsafeQueueUserWorkItem (null, 1); + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + } + +#if NET_4_0 + event WaitCallback e; + + [Test] + public void UnsafeQueueUserWorkItem_MulticastDelegate () + { + CountdownEvent ev = new CountdownEvent (2); + + e += delegate { + ev.Signal (); + }; + + e += delegate { + ev.Signal (); + }; + + ThreadPool.UnsafeQueueUserWorkItem (e, null); + Assert.IsTrue (ev.Wait (3000)); + } +#endif } } \ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index 7d483e6703..ca5489ef0d 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -837,6 +837,13 @@ namespace MonoTests.System.Threading } } + [Test] + public void GetNamedDataSlotTest () + { + Assert.IsNotNull (Thread.GetNamedDataSlot ("te#st"), "#1"); + Assert.AreSame (Thread.GetNamedDataSlot ("te#st"), Thread.GetNamedDataSlot ("te#st"), "#2"); + } + void CheckIsRunning (string s, Thread t) { int c = counter; diff --git a/mcs/class/corlib/Test/System.Threading/TimerTest.cs b/mcs/class/corlib/Test/System.Threading/TimerTest.cs index 2c05538c72..ee60eb53aa 100644 --- a/mcs/class/corlib/Test/System.Threading/TimerTest.cs +++ b/mcs/class/corlib/Test/System.Threading/TimerTest.cs @@ -60,11 +60,11 @@ namespace MonoTests.System.Threading { Timer t = new Timer (new TimerCallback (Callback), bucket, 10, 10); Thread.Sleep (500); int c = bucket.count; - Assert.IsTrue(c > 20, "#1"); + Assert.IsTrue (c > 20, "#1 " + c.ToString ()); t.Change (100, 100); c = bucket.count; Thread.Sleep (500); - Assert.IsTrue(bucket.count <= c + 20, "#2"); + Assert.IsTrue (bucket.count <= c + 20, "#2 " + c.ToString ()); t.Dispose (); } @@ -193,8 +193,7 @@ namespace MonoTests.System.Threading { Thread.Sleep(100); t.Change (int.MaxValue, Timeout.Infinite); // since period is 0 the callback should happen once (bug #340212) - Assert.IsTrue(b.count == 1); - + Assert.AreEqual (1, b.count, "only once"); } [Test] diff --git a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs index bc91e12686..d133a82cd8 100644 --- a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs +++ b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs @@ -108,6 +108,17 @@ namespace MonoTests.System } } + [Test] + public void GetBaseWithInner () + { + var ae = new AggregateException ("x", new [] { new ArgumentException (), new ArgumentNullException () }); + Assert.AreEqual (ae, ae.GetBaseException (), "#1"); + + var expected = new ArgumentException (); + var ae2 = new AggregateException ("x", new AggregateException (expected, new Exception ())); + Assert.AreEqual (expected, ae2.GetBaseException ().InnerException, "#2"); + } + static void Throws (Type t, Action action) { Exception e = null; diff --git a/mcs/class/corlib/Test/System/AppDomainTest.cs b/mcs/class/corlib/Test/System/AppDomainTest.cs index 1d88666538..8772d7afde 100644 --- a/mcs/class/corlib/Test/System/AppDomainTest.cs +++ b/mcs/class/corlib/Test/System/AppDomainTest.cs @@ -2073,7 +2073,6 @@ namespace MonoTests.System AppDomain.CurrentDomain.ExecuteAssembly ( assembly.Location); Assert.Fail ("#1"); -#if NET_2_0 } catch (MissingMethodException ex) { // Entry point not found in assembly '...' Assert.AreEqual (typeof (MissingMethodException), ex.GetType (), "#2"); @@ -2081,15 +2080,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.Message, "#4"); Assert.IsTrue (ex.Message.IndexOf (assembly.FullName) != -1, "#5"); } -#else - } catch (COMException ex) { - // Unspecified error - Assert.AreEqual (typeof (COMException), ex.GetType (), "#2"); - Assert.AreEqual (-2147467259, ex.ErrorCode, "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.IsNotNull (ex.Message, "#5"); - } -#endif } [Test] // ExecuteAssembly (String, Evidence) @@ -2102,7 +2092,6 @@ namespace MonoTests.System assembly.Location, (Evidence) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (MissingMethodException ex) { // Entry point not found in assembly '...' Assert.AreEqual (typeof (MissingMethodException), ex.GetType (), "#2"); @@ -2110,15 +2099,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.Message, "#4"); Assert.IsTrue (ex.Message.IndexOf (assembly.FullName) != -1, "#5"); } -#else - } catch (COMException ex) { - // Unspecified error - Assert.AreEqual (typeof (COMException), ex.GetType (), "#2"); - Assert.AreEqual (-2147467259, ex.ErrorCode, "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.IsNotNull (ex.Message, "#5"); - } -#endif } [Test] // ExecuteAssembly (String, Evidence, String []) @@ -2132,7 +2112,6 @@ namespace MonoTests.System (Evidence) null, new string [0]); Assert.Fail ("#1"); -#if NET_2_0 } catch (MissingMethodException ex) { // Entry point not found in assembly '...' Assert.AreEqual (typeof (MissingMethodException), ex.GetType (), "#2"); @@ -2140,15 +2119,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.Message, "#4"); Assert.IsTrue (ex.Message.IndexOf (assembly.FullName) != -1, "#5"); } -#else - } catch (COMException ex) { - // Unspecified error - Assert.AreEqual (typeof (COMException), ex.GetType (), "#2"); - Assert.AreEqual (-2147467259, ex.ErrorCode, "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.IsNotNull (ex.Message, "#5"); - } -#endif } [Test] // ExecuteAssembly (String, Evidence, String [], Byte [], AssemblyHashAlgorithm) @@ -2165,7 +2135,6 @@ namespace MonoTests.System (byte []) null, AssemblyHashAlgorithm.SHA1); Assert.Fail ("#1"); -#if NET_2_0 } catch (MissingMethodException ex) { // Entry point not found in assembly '...' Assert.AreEqual (typeof (MissingMethodException), ex.GetType (), "#2"); @@ -2173,15 +2142,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.Message, "#4"); Assert.IsTrue (ex.Message.IndexOf (assembly.FullName) != -1, "#5"); } -#else - } catch (COMException ex) { - // Unspecified error - Assert.AreEqual (typeof (COMException), ex.GetType (), "#2"); - Assert.AreEqual (-2147467259, ex.ErrorCode, "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.IsNotNull (ex.Message, "#5"); - } -#endif } [Test] // bug #79720 @@ -3044,14 +3004,9 @@ namespace MonoTests.System try { AppDomain.CurrentDomain.Load (aname); Assert.Fail ("#C9"); -#if NET_2_0 } catch (SecurityException) { // Invalid assembly public key } -#else - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522C"; @@ -3212,6 +3167,30 @@ namespace MonoTests.System // we have no public way to get the default appdomain } + static bool resolve_called; + + [Test] + public void AssemblyResolveParseError () + { + AppDomain currentDomain = AppDomain.CurrentDomain; + ResolveEventHandler d = ParseErrorResolve; + currentDomain.AssemblyResolve += d; + try { + resolve_called = false; + var a = Assembly.Load ("MyDynamicType, 1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"); + Assert.Fail (); + } catch (FileNotFoundException) { + Assert.IsTrue (resolve_called); + } + currentDomain.AssemblyResolve -= d; + } + + static Assembly ParseErrorResolve (object sender, ResolveEventArgs args) + { + resolve_called = true; + return null; + } + [Test] public void ReflectionOnlyGetAssemblies () { @@ -3329,6 +3308,14 @@ namespace MonoTests.System TestSerialization (tester, typeof (StuffToPick).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int))); } + [Test] + public void ShadowCopyTypeGetTypeMissingAssemblyTest () + { + ad = CreateShadowCopyAppDomain (tempDir, true); + CrossDomainTester tester = CreateCrossDomainTester (ad); + tester.AssertLoadMissingAssemblyType (); + } + private static AppDomain CreateTestDomain (string baseDirectory, bool assemblyResolver) { AppDomainSetup setup = new AppDomainSetup (); @@ -3337,6 +3324,15 @@ namespace MonoTests.System return CreateTestDomain (setup, assemblyResolver); } + private static AppDomain CreateShadowCopyAppDomain (string baseDirectory, bool assemblyResolver) + { + AppDomainSetup setup = new AppDomainSetup (); + setup.ApplicationBase = baseDirectory; + setup.ApplicationName = "testdomain"; + setup.ShadowCopyFiles = "true"; + return CreateTestDomain (setup, assemblyResolver); + } + private static AppDomain CreateTestDomain (AppDomainSetup setup, bool assemblyResolver) { AppDomain ad = AppDomain.CreateDomain ("testdomain", @@ -3444,22 +3440,17 @@ namespace MonoTests.System } } - public bool AssertFileLoadException (AssemblyName assemblyRef) + public void AssertLoadMissingAssemblyType () { - try { - AppDomain.CurrentDomain.Load (assemblyRef); - return false; - } catch (FileLoadException) { - return true; - } + Assert.IsNull (Type.GetType ("A.B.C, MissingAssembly")); } - public bool AssertFileNotFoundException (AssemblyName assemblyRef) + public bool AssertFileLoadException (AssemblyName assemblyRef) { try { AppDomain.CurrentDomain.Load (assemblyRef); return false; - } catch (FileNotFoundException) { + } catch (FileLoadException) { return true; } } @@ -3629,4 +3620,4 @@ namespace MonoTests.System } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/Test/System/ArraySegmentTest.cs b/mcs/class/corlib/Test/System/ArraySegmentTest.cs index 6a4d8ae78f..28588f8e00 100644 --- a/mcs/class/corlib/Test/System/ArraySegmentTest.cs +++ b/mcs/class/corlib/Test/System/ArraySegmentTest.cs @@ -260,6 +260,24 @@ namespace MonoTests.System s[1] = -3; Assert.AreEqual (-3, s[1], "#2a"); } + + [Test] + [ExpectedException (typeof (ArgumentOutOfRangeException))] + public void IList_IndexerErrorTest1 () + { + byte[] arr = new byte[4]; + IList seg = new ArraySegment (arr, 1, 2); + seg[-1] = 3; + } + + [Test] + [ExpectedException (typeof (ArgumentOutOfRangeException))] + public void IList_IndexerErrorTest2 () + { + byte[] arr = new byte[4]; + IList seg = new ArraySegment (arr); + seg[4] = 3; + } #endif } } diff --git a/mcs/class/corlib/Test/System/ArrayTest.cs b/mcs/class/corlib/Test/System/ArrayTest.cs index 4c74ee9d3d..ef41ce1794 100644 --- a/mcs/class/corlib/Test/System/ArrayTest.cs +++ b/mcs/class/corlib/Test/System/ArrayTest.cs @@ -1618,6 +1618,126 @@ public class ArrayTest } } + + [Test] + public void FindIndexTest () + { + var a = new int[] { 2, 2, 2, 3, 2 }; + Assert.AreEqual (2, Array.FindIndex (a, 2, 2, l => true)); + } + + [Test] + public void FindIndex_Invalid () + { + var array = new int [] { 1, 2, 3, 4, 5 }; + + try { + Array.FindIndex (array, null); + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + + try { + Array.FindIndex (array, -1, l => true); + Assert.Fail ("#2"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindIndex (array, -1, 0, l => true); + Assert.Fail ("#2b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindIndex (array, 0, -1, l => true); + Assert.Fail ("#3"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindIndex (array, 100, l => true); + Assert.Fail ("#4"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindIndex (array, 100, 0, l => true); + Assert.Fail ("#4b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindIndex (array, 7, 2, l => true); + Assert.Fail ("#5"); + } catch (ArgumentOutOfRangeException) { + } + } + + [Test, ExpectedException (typeof (ArgumentNullException))] + public void FindLastNullTest () + { + var array = new int [] { 1, 2, 3, 4, 5 }; + Array.FindLast (array, null); + } + + [Test] + public void FindLastIndexTest () + { + var array = new int [] { 1, 2, 3, 4, 5 }; + + Assert.AreEqual (2, Array.FindLastIndex (array, 2, 3, l => true)); + Assert.AreEqual (2, Array.FindLastIndex (array, 2, 2, l => true)); + Assert.AreEqual (1, Array.FindLastIndex (array, 1, 2, l => true)); + } + + [Test] + public void FindLastIndex_Invalid () + { + var array = new int [] { 1, 2, 3, 4, 5 }; + try { + Array.FindLastIndex (array, null); + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + + try { + Array.FindLastIndex (array, -1, l => true); + Assert.Fail ("#2"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindLastIndex (array, -1, 0, l => true); + Assert.Fail ("#2b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindLastIndex (array, 0, -1, l => true); + Assert.Fail ("#3"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindLastIndex (array, 100, l => true); + Assert.Fail ("#4"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindLastIndex (array, 100, 0, l => true); + Assert.Fail ("#4b"); + } catch (ArgumentOutOfRangeException) { + } + + try { + Array.FindLastIndex (array, 2, 4, l => true); + Assert.Fail ("#5"); + } catch (ArgumentOutOfRangeException) { + } + } + [Test] public void TestReverse() { { diff --git a/mcs/class/corlib/Test/System/AttributeTest.cs b/mcs/class/corlib/Test/System/AttributeTest.cs index f8fe8cd7a0..10fb4fcbce 100644 --- a/mcs/class/corlib/Test/System/AttributeTest.cs +++ b/mcs/class/corlib/Test/System/AttributeTest.cs @@ -88,6 +88,13 @@ namespace MonoTests.System class MyDerivedClassNoAttribute : MyClass { } + + internal class AttributeWithTypeId : Attribute + { + public override object TypeId { + get { return this; } + } + } } [TestFixture] @@ -998,6 +1005,14 @@ namespace MonoTests.System MyOwnCustomAttribute b1 = new MyOwnCustomAttribute (null); Assert.AreNotEqual (a1.GetHashCode (), b1.GetHashCode (), "non-identical-types"); } + + [Test] + public void GetHashCodeWithOverriddenTypeId () + { + //check for not throwing stack overflow exception + AttributeWithTypeId a = new AttributeWithTypeId (); + a.GetHashCode (); + } } namespace ParamNamespace { diff --git a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs index df685fc0dd..3bc65a8204 100644 --- a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs +++ b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs @@ -163,7 +163,7 @@ namespace MonoTests.System { Assert.AreEqual (dto.ToString ("r", new CultureInfo ("en-us")), dto.ToString ("R", new CultureInfo ("en-us"))); Assert.AreEqual ("2007-10-31T21:00:00", dto.ToString ("s", new CultureInfo ("en-us"))); Assert.AreEqual ("2007-11-01 05:00:00Z", dto.ToString ("u", new CultureInfo ("en-us"))); - Assert.AreEqual ("October, 2007", dto.ToString ("Y", new CultureInfo ("en-us"))); + Assert.AreEqual ("October 2007", dto.ToString ("Y", new CultureInfo ("en-us"))); Assert.AreEqual (dto.ToString ("y", new CultureInfo ("en-us")), dto.ToString ("Y", new CultureInfo ("en-us"))); } diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs b/mcs/class/corlib/Test/System/DateTimeTest.cs index 72da88876a..30de11b489 100644 --- a/mcs/class/corlib/Test/System/DateTimeTest.cs +++ b/mcs/class/corlib/Test/System/DateTimeTest.cs @@ -2476,11 +2476,11 @@ namespace MonoTests.System } [Test] - public void Foo () + public void GenitiveMonth () { var ci = new CultureInfo ("ru-RU"); var dt = new DateTime (2012, 9, 15); - Assert.AreEqual ("сентября 15", dt.ToString ("m", ci)); + Assert.AreEqual ("15 сентября", dt.ToString ("m", ci)); } } } diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs index f6c0dca2a5..973b068e82 100644 --- a/mcs/class/corlib/Test/System/EnumTest.cs +++ b/mcs/class/corlib/Test/System/EnumTest.cs @@ -849,9 +849,12 @@ namespace MonoTests.System } [Test] - public void ConvertToStringType () + public void IConvertible_Valid () { - Assert.AreEqual ("This", ((IConvertible) TestingEnum.This).ToType (typeof (string), null)); + IConvertible ic = TestingEnum.This; + Assert.AreEqual ("This", ic.ToType (typeof (string), null), "#1"); + Assert.AreEqual (TestingEnum.This, ic.ToType (typeof (TestingEnum), null), "#2"); + Assert.AreEqual (TestingEnum.This, ic.ToType (typeof (Enum), null), "#3"); } [Test] diff --git a/mcs/class/corlib/Test/System/IntegerFormatterTest.cs b/mcs/class/corlib/Test/System/IntegerFormatterTest.cs index 8873f308cd..a09e98a1b4 100644 --- a/mcs/class/corlib/Test/System/IntegerFormatterTest.cs +++ b/mcs/class/corlib/Test/System/IntegerFormatterTest.cs @@ -123,7 +123,10 @@ public class IntegerFormatterTest } - private static string tutti = "Int32\n" + + private static string tutti = tutti_1 + tutti_2; + + const string tutti_1 = + "Int32\n" + "(-2147483648) (C) (($2,147,483,648.00))\n" + "(-2147483648) (C0) (($2,147,483,648))\n" + "(-2147483648) (C1) (($2,147,483,648.0))\n" + @@ -852,7 +855,9 @@ public class IntegerFormatterTest "(9223372036854775807) (X8) (7FFFFFFFFFFFFFFF)\n" + "(9223372036854775807) (X9) (7FFFFFFFFFFFFFFF)\n" + "(9223372036854775807) (X10) (7FFFFFFFFFFFFFFF)\n" + -"(9223372036854775807) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000007FFFFFFFFFFFFFFF)\n" + +"(9223372036854775807) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000007FFFFFFFFFFFFFFF)\n"; + +const string tutti_2 = "(0) (C) ($0.00)\n" + "(0) (C0) ($0)\n" + "(0) (C1) ($0.0)\n" + @@ -2000,6 +2005,5 @@ public class IntegerFormatterTest "(100) (X10) (0000000064)\n" + "(100) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064)\n"; } - } diff --git a/mcs/class/corlib/Test/System/RandomTest.cs b/mcs/class/corlib/Test/System/RandomTest.cs index a18524968f..5e49ac3866 100644 --- a/mcs/class/corlib/Test/System/RandomTest.cs +++ b/mcs/class/corlib/Test/System/RandomTest.cs @@ -3,9 +3,10 @@ // // Authors: // Bob Smith -// Sebastien Pouliot +// Sebastien Pouliot // // Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// Copyright 2013 Xamarin Inc. (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -29,44 +30,21 @@ using NUnit.Framework; using System; +using System.Reflection; namespace MonoTests.System { [TestFixture] public class RandomTest { -#if false - // - // This test will fail, given enough runs. - // - // It is an ad-hoc test for distribution, and does not work - // 100% of the time. - // - [Test] - public void NextDouble () - { - Random r = new Random (); - int i; - double c=0; - for (i=0; i<20; i++) - c += r.NextDouble (); - c/=i; - Assert.IsTrue (c.ToString () + " is out of range.", c < .7 && c > .3); - } - -#endif - [Test] public void CompareStreamWithSameSeed () { Random r = new Random (42); Random r2 = new Random (42); - double c=0, c2=0; for (int i=0; i<20; i++) { - c += r.NextDouble (); - c2 += r2.NextDouble (); + Assert.AreEqual (r.NextDouble (), r2.NextDouble (), i.ToString ()); } - Assert.AreEqual (c, c2, "Compare"); } [Test] @@ -79,6 +57,13 @@ namespace MonoTests.System { } } + [Test] + public void NextZero () + { + Random r = new Random (); + Assert.AreEqual (0, r.Next (0),"Next(0) failed"); + } + [Test] public void NextMax() { @@ -109,23 +94,124 @@ namespace MonoTests.System { } } -/* Mono implementation is now compatible with Knuth (not MS) implementation (choice of constants) + class RandomSampleOverride : Random { + + protected override double Sample () + { + throw new NotImplementedException (); + } + } + [Test] - public void CompareWithMS () + public void Base_Int () { - string[] r = new string [4]; - byte[] buffer = new byte [8]; - int x = 4; - while (x-- > 0) { - int seed = (x << x); - Random random = new Random (seed); - random.NextBytes (buffer); - r [x] = BitConverter.ToString (buffer); + var random = new RandomSampleOverride (); + // from 2.0+ Next(), Next(int,int) and NextBytes(byte[]) do not call Sample + // see MSDN's Notes to Inheritors + random.Next (); + random.Next (Int32.MinValue, Int32.MaxValue); + random.NextBytes (new byte[1]); + } + + [Test] + [ExpectedException (typeof (NotImplementedException))] + public void Base_Double () + { + var random = new RandomSampleOverride (); + random.NextDouble (); + } + + // generate values (one for each 1024 returned values) from the original C implementation + static uint[] jkiss_values = { + 560241513, /* 0 */ + 1281708802, /* 1024 */ + 1571324528, /* 2048 */ + 1565809406, /* 3072 */ + 1010890569, /* 4096 */ + 1778803435, /* 5120 */ + 903613637, /* 6144 */ + 3496059008, /* 7168 */ + 108603163, /* 8192 */ + 1854081276, /* 9216 */ + 3703232459, /* 10240 */ + 2191562138, /* 11264 */ + 337995793, /* 12288 */ + 1340840062, /* 13312 */ + 2364148985, /* 14336 */ + 2549812361, /* 15360 */ + 563432369, /* 16384 */ + 229365487, /* 17408 */ + 1821397325, /* 18432 */ + 3246092454, /* 19456 */ + 691032417, /* 20480 */ + 86951316, /* 21504 */ + 3029975455, /* 22528 */ + 1261370163, /* 23552 */ + 2539815382, /* 24576 */ + 3017891647, /* 25600 */ + 3877215120, /* 26624 */ + 3142958765, /* 27648 */ + 1080903191, /* 28672 */ + 2837464745, /* 29696 */ + 614275602, /* 30720 */ + 2250626199, /* 31744 */ + 729001311, /* 32768 */ + 3313769017, /* 33792 */ + 2408398670, /* 34816 */ + 3123583383, /* 35840 */ + 3346590423, /* 36864 */ + 1629546563, /* 37888 */ + 251343753, /* 38912 */ + 2695793631, /* 39936 */ + 2768993787, /* 40960 */ + 3688573224, /* 41984 */ + 2897218561, /* 43008 */ + 2725058810, /* 44032 */ + 2142061914, /* 45056 */ + 3983217096, /* 46080 */ + 3609758190, /* 47104 */ + 842060935, /* 48128 */ + 2893482035, /* 49152 */ + 2290461665, /* 50176 */ + 1709481476, /* 51200 */ + 3633857838, /* 52224 */ + 332645044, /* 53248 */ + 3522654497, /* 54272 */ + 2501348469, /* 55296 */ + 1644344287, /* 56320 */ + 3081428084, /* 57344 */ + 3114560766, /* 58368 */ + 489030597, /* 59392 */ + 367291591, /* 60416 */ + 106358682, /* 61440 */ + 3020781303, /* 62464 */ + 1209590375, /* 63488 */ + 1833282169, /* 64512 */ + 61543407, /* 65536 */ + }; + + [Test] + public void JKISS () + { + // Random.Next() returns a non-negative *signed* integer value - so it can't be used for testing + var next = typeof(Random).GetMethod ("JKiss", BindingFlags.Instance | BindingFlags.NonPublic); + + // if the method is not present, e.g. on MS.NET, skip this test + if (next == null) + return; + + // ensure we match the original JKISS random stream + // first 64KB but without checking every value (one each KB) + Random r = new Random (123456789); + int n = 0; + int j = 0; + while (j < 64 * 1024) { + uint random = (uint) next.Invoke (r, null); + if (j++ % 1024 == 0) { + Assert.AreEqual (random, jkiss_values [n], n.ToString ()); + n++; + } } - Assert.AreEqual ("43-DB-8B-AE-0A-88-A8-7B", r [3], "Seed(24)"); - Assert.AreEqual ("E7-2A-5C-44-D1-8C-7D-74", r [2], "Seed(8)"); - Assert.AreEqual ("C5-67-2A-FC-1B-4E-CD-72", r [1], "Seed(2)"); - Assert.AreEqual ("B9-D1-C4-8E-34-8F-E7-71", r [0], "Seed(0)"); - }*/ + } } -} +} \ No newline at end of file diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs index 4d675d51e6..4403fd6346 100644 --- a/mcs/class/corlib/Test/System/TimeZoneTest.cs +++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs @@ -122,6 +122,32 @@ public class TimeZoneTest { Assert.AreEqual(0L, t1.GetUtcOffset (d5).Ticks, "D14"); } + private void NZST(TimeZone t1) { + Assert.AreEqual("NZST", t1.StandardName, "E01"); + Assert.AreEqual("NZDT", t1.DaylightName, "E02"); + + DaylightTime d1 = t1.GetDaylightChanges (2013); + Assert.AreEqual("09/29/2013 02:00:00", d1.Start.ToString ("G"), "E03"); + Assert.AreEqual("04/07/2013 03:00:00", d1.End.ToString ("G"), "E04"); + Assert.AreEqual(36000000000L, d1.Delta.Ticks, "E05"); + + DaylightTime d2 = t1.GetDaylightChanges (2001); + Assert.AreEqual("10/07/2001 02:00:00", d2.Start.ToString ("G"), "E06"); + Assert.AreEqual("03/18/2001 03:00:00", d2.End.ToString ("G"), "E07"); + Assert.AreEqual(36000000000L, d2.Delta.Ticks, "E08"); + + DateTime d3 = new DateTime(2013,02,15); + Assert.AreEqual(true, t1.IsDaylightSavingTime (d3), "E09"); + DateTime d4 = new DateTime(2013,04,30); + Assert.AreEqual(false, t1.IsDaylightSavingTime (d4), "E10"); + DateTime d5 = new DateTime(2013,11,03); + Assert.AreEqual(true, t1.IsDaylightSavingTime (d5), "E11"); + + Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d3).Ticks, "E12"); + Assert.AreEqual(36000000000L /*hour*/ * 12L, t1.GetUtcOffset (d4).Ticks, "E13"); + Assert.AreEqual(36000000000L /*hour*/ * 13L, t1.GetUtcOffset (d5).Ticks, "E14"); + } + [Test] [Culture ("")] public void TestCtors () @@ -141,6 +167,9 @@ public class TimeZoneTest { case "GMT": GMT (t1); break; + case "NZST": + NZST (t1); + break; default: NUnit.Framework.Assert.Ignore ("Your time zone (" + t1.StandardName + ") isn't defined in the test case"); break; @@ -251,6 +280,45 @@ public class TimeZoneTest { Assert.IsTrue (tz.ToLocalTime (dst_start_utc.Add (new TimeSpan (1, 0, 0))) < tz.ToLocalTime (dst_start_utc.Add (new TimeSpan (1, 1, 0))), "0:4:00 < 0:4:01"); } + [Test] + public void GetUtcOffsetAtDSTBoundary () + { + /* + * Getting a definitive list of timezones which do or don't observe Daylight + * Savings is difficult (can't say America's or USA definitively) and lengthy see + * + * http://en.wikipedia.org/wiki/Daylight_saving_time_by_country + * + * as a good starting point for a list. + * + * The following are SOME of the timezones/regions which do support daylight savings. + * + * Pacific/Auckland + * Pacific/Sydney + * USA (EST, CST, MST, PST, AKST) note this does not cover all states or regions + * Europe/London (GMT) + * CET (member states of the European Union) + * + * This test should work in all the above timezones + */ + + + TimeZone tz = TimeZone.CurrentTimeZone; + DaylightTime daylightChanges = tz.GetDaylightChanges(2007); + DateTime dst_end = daylightChanges.End; + + if (dst_end == DateTime.MinValue) + Assert.Ignore (tz.StandardName + " did not observe daylight saving time during 2007."); + + var standardOffset = tz.GetUtcOffset(daylightChanges.Start.AddMinutes(-1)); + + Assert.AreEqual(standardOffset, tz.GetUtcOffset (dst_end)); + Assert.AreEqual(standardOffset, tz.GetUtcOffset (dst_end.Add (daylightChanges.Delta.Negate ().Add (TimeSpan.FromSeconds(1))))); + Assert.AreEqual(standardOffset, tz.GetUtcOffset (dst_end.Add(daylightChanges.Delta.Negate ()))); + Assert.AreNotEqual(standardOffset, tz.GetUtcOffset (dst_end.Add(daylightChanges.Delta.Negate ().Add (TimeSpan.FromSeconds(-1))))); + } + + [Test] public void StaticProperties () { diff --git a/mcs/class/corlib/Test/System/TupleTest.cs b/mcs/class/corlib/Test/System/TupleTest.cs new file mode 100644 index 0000000000..cf410e7855 --- /dev/null +++ b/mcs/class/corlib/Test/System/TupleTest.cs @@ -0,0 +1,63 @@ +// +// TupleTest.cs +// +// Authors: +// Marek Safar +// +// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#if NET_4_0 + +using System; +using NUnit.Framework; + +namespace MonoTests.System +{ + [TestFixture] + public class TupleTest + { + [Test] + [ExpectedException (typeof (ArgumentException))] + public void TupleWithRest_Invalid () + { + new Tuple (1, 2, 3, 4, 5, 6, 7, 8); + } + + [Test] + [ExpectedException (typeof (ArgumentException))] + public void TupleWithRest_InvalidDueToNull () + { + new Tuple> (1, null, 3, 4, 5, 6, 7, null); + } + + [Test] + public void ToStringTest () + { + var t1 = new Tuple> (1, null, 3, 4, 5, 6, 7, new Tuple (null, null)); + + Assert.AreEqual ("(1, , 3, 4, 5, 6, 7, , )", t1.ToString (), "#1"); + } + } +} + +#endif \ No newline at end of file diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs index bc726ce38f..8972880062 100644 --- a/mcs/class/corlib/Test/System/TypeTest.cs +++ b/mcs/class/corlib/Test/System/TypeTest.cs @@ -4024,6 +4024,25 @@ PublicKeyToken=b77a5c561934e089")); } #endif + [Test] + public void GetTypeParseGenericCorrectly () { //Bug #15124 + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1"), typeof (Foo<>), "#1"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32]"), typeof (Foo), "#2"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[[System.Int32]]"), typeof (Foo), "#3"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32][]"), typeof (Foo[]), "#4"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[][System.Int32]"), null, "#5"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32][,]"), typeof (Foo[,]), "#6"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[]"), typeof (Foo<>).MakeArrayType(), "#7"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[,]"), typeof (Foo<>).MakeArrayType (2), "#8"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[][]"), typeof (Foo<>).MakeArrayType ().MakeArrayType (), "#9"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1["), null, "#10"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[["), null, "#11"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[[]"), null, "#12"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[,"), null, "#13"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[*"), null, "#14"); + Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32"), null, "#15"); + } + public abstract class Stream : IDisposable { public void Dispose () diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index f581c0d5e5..3bab3edb7f 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -925,6 +925,18 @@ System.Runtime.InteropServices.ComTypes/VARDESC.cs System.Runtime.InteropServices.ComTypes/VARFLAGS.cs System.Runtime.InteropServices.ComTypes/VARKIND.cs System.Runtime.InteropServices.Expando/IExpando.cs +System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs +System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs +System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs +System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs +System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs +System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs +System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs +System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs +System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs +System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs +System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs +System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs System.Runtime.Remoting/ActivatedClientTypeEntry.cs System.Runtime.Remoting/ActivatedServiceTypeEntry.cs System.Runtime.Remoting/CustomErrorsModes.cs diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources index 51c354cc22..3308dd5899 100644 --- a/mcs/class/corlib/corlib_test.dll.sources +++ b/mcs/class/corlib/corlib_test.dll.sources @@ -25,6 +25,7 @@ System/ModuleHandleTest.cs System/ObsoleteAttributeTest.cs System/IntegerTryParse.cs System/LazyTest.cs +System/TupleTest.cs System.Collections/ArrayListTest.cs System.Collections/BitArrayTest.cs System.Collections/CaseInsensitiveComparerTest.cs @@ -56,6 +57,7 @@ System/DecimalFormatterTest.cs System/DecimalTest2.cs System/DecimalTest.cs System.Diagnostics/DebuggerDisplayAttributeTest.cs +System.Diagnostics/DebuggerTypeProxyAttribute.cs System.Diagnostics/StackFrameTest.cs System.Diagnostics/StackTraceTest.cs System.Diagnostics.Contracts/ContractAssertTest.cs @@ -79,6 +81,7 @@ System.Globalization/DateTimeFormatInfoTest.cs System.Globalization/DaylightTimeTest.cs System.Globalization/EastAsianLunisolarCalendarTest.cs System.Globalization/IdnMappingTest.cs +System.Globalization/NumberFormatInfoTest.cs System.Globalization/RegionInfoTest.cs System.Globalization/SortKeyTest.cs System.Globalization/StringInfoTest.cs -- cgit v1.2.3