Browse Source

[system.core] TaskExtensions from reference source

Marek Safar 11 years ago
parent
commit
a844019685

+ 0 - 53
mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs

@@ -1,53 +0,0 @@
-//
-// TaskExtensions.cs
-//
-// Authors:
-//       Jérémie "Garuma" Laval <[email protected]>
-//       Marek Safar ([email protected])
-//
-// Copyright (c) 2010 Jérémie "Garuma" Laval
-// 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.
-//
-
-
-namespace System.Threading.Tasks 
-{
-	public static class TaskExtensions
-	{
-		public static Task<TResult> Unwrap<TResult> (this Task<Task<TResult>> task)
-		{
-			if (task == null)
-				throw new ArgumentNullException ("task");
-
-			return TaskExtensionsImpl.Unwrap (task);
-		}
-
-		public static Task Unwrap (this Task<Task> task)
-		{
-			if (task == null)
-				throw new ArgumentNullException ("task");
-
-			return TaskExtensionsImpl.Unwrap (task);
-		}
-	}
-}
-

+ 3 - 1
mcs/class/System.Core/mobile_common_System.Core.dll.sources

@@ -51,7 +51,6 @@ System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
 Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
 System.IO/HandleInheritability.cs
-System.Threading.Tasks/TaskExtensions.cs
 System.Linq.Expressions/Extensions.cs
 System.Linq.Expressions/ExpressionTransformer.cs
 ../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
@@ -202,4 +201,7 @@ ReferenceSources/SR.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/Util.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/Wrapper.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/WrapperEqualityComparer.cs
+
 ../../../external/referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
+
+../../../external/referencesource/System.Core/System/threading/Tasks/TaskExtensions.cs

+ 2 - 2
mcs/class/System.Core/net_4_0_System.Core.dll.sources

@@ -62,8 +62,6 @@ System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 System.Threading/LockRecursionException.cs
 System.Threading/ThreadLockState.cs
 System.Threading/ReaderWriterLockSlimExtensions.cs
-System.Threading.Tasks/TaskExtensions.cs
-../corlib/System.Threading.Tasks/TaskExtensionsImpl.cs
 
 System.Linq.Expressions/Extensions.cs
 System.Linq.Expressions/ExpressionTransformer.cs
@@ -232,5 +230,7 @@ ReferenceSources/SR.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/Util.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/Wrapper.cs
 ../../../external/referencesource/System.Core/System/Linq/Parallel/Utils/WrapperEqualityComparer.cs
+
 ../../../external/referencesource/System.Core/System/threading/ReaderWriterLockSlim/ReaderWriterLockSlim.cs
 
+../../../external/referencesource/System.Core/System/threading/Tasks/TaskExtensions.cs

+ 0 - 1
mcs/class/System.Core/net_4_5_System.Core.dll.sources

@@ -2,4 +2,3 @@
 
 ../dlr/Runtime/Microsoft.Scripting.Core/Ast/DynamicExpression.cs
 System.Linq.Expressions/DynamicExpressionVisitor.cs
-../corlib/System.Threading.Tasks/TaskExtensionsImpl.cs