Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -1,7 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22823.1
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Threading.Tasks.Tests", "tests\System.Threading.Tasks.Tests.csproj", "{B6C09633-D161-499A-8FE1-46B2D53A16E7}"
ProjectSection(ProjectDependencies) = postProject
@@ -9,93 +8,43 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Threading.Tasks.Test
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Threading.Tasks", "src\System.Threading.Tasks.csproj", "{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}"
ProjectSection(ProjectDependencies) = postProject
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C} = {27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Threading.Tasks", "ref\System.Threading.Tasks.csproj", "{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU
ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU
DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU
ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU
DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU
ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU
DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU
ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU
DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU
ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU
DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU
ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = uap101aot-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = uap101aot-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = uap101aot-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = uap101aot-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = uap101aot-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = uap101aot-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = uap101aot-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppuap101aot-Windows_NTnetcoreapp|AnyCPU.Build.0 = uap101aot-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp1.2corert-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp1.2corert-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp1.2corert-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp1.2corert-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp1.2corert-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.DebugNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp1.2corert-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.ActiveCfg = netcoreapp1.2corert-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.ReleaseNETCoreAppnetcoreapp1.2corertnetcoreapp|AnyCPU.Build.0 = netcoreapp1.2corert-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.Debug|Any CPU.ActiveCfg = netstandard-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.Debug|Any CPU.Build.0 = netstandard-Debug|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.Release|Any CPU.ActiveCfg = netstandard-Release|Any CPU
{B6C09633-D161-499A-8FE1-46B2D53A16E7}.Release|Any CPU.Build.0 = netstandard-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B6C09633-D161-499A-8FE1-46B2D53A16E7} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
{3BCAEAA6-3A29-49EC-B334-6E7BE8BE9ABA} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
EndGlobalSection
EndGlobal

View File

@@ -4,5 +4,6 @@
<PropertyGroup>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
<IsUAP>true</IsUAP>
</PropertyGroup>
</Project>

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<ProjectGuid>{27675CCE-B6F9-4E2F-9BF2-5E623173BD5C}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />

View File

@@ -1,11 +0,0 @@
Compat issues with assembly System.Threading.Tasks:
CannotRemoveBaseTypeOrInterface : Type 'System.OperationCanceledException' does not inherit from base type 'System.SystemException' in the implementation but it does in the contract.
MembersMustExist : Member 'System.OperationCanceledException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.Task' does not implement interface 'System.IDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Threading.Tasks.Task.Dispose()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Threading.Tasks.Task.Dispose(System.Boolean)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.Task<TResult>' does not implement interface 'System.IDisposable' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.TaskCanceledException' does not inherit from base type 'System.SystemException' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Threading.Tasks.TaskCanceledException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Threading.Tasks.TaskSchedulerException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
Total Issues: 9

View File

@@ -1,12 +0,0 @@
Compat issues with assembly System.Threading.Tasks:
MembersMustExist : Member 'System.AggregateException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.OperationCanceledException' does not inherit from base type 'System.SystemException' in the implementation but it does in the contract.
MembersMustExist : Member 'System.OperationCanceledException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.Task' does not implement interface 'System.IDisposable' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Threading.Tasks.Task.Dispose()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Threading.Tasks.Task.Dispose(System.Boolean)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.Task<TResult>' does not implement interface 'System.IDisposable' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Threading.Tasks.TaskCanceledException' does not inherit from base type 'System.SystemException' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Threading.Tasks.TaskCanceledException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Threading.Tasks.TaskSchedulerException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
Total Issues: 10

View File

@@ -2,11 +2,10 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
uap101aot-Windows_NT;
net463-Windows_NT;
uapaot-Windows_NT;
uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
netcoreapp1.2corert;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -7,29 +7,14 @@
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp1.2corert-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp1.2corert-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap101aot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap101aot-Windows_NT-Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="System\Threading\Tasks\TaskExtensions.CoreCLR.cs" />
<ProjectReference Include="..\..\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj" />
<TargetingPackReference Include="System.Private.CoreLib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System.Core" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'uap101aot' or '$(TargetGroup)' == 'netcoreapp1.2corert'">
<Compile Include="System\Threading\Tasks\TaskExtensions.CoreRT.cs" />
<TargetingPackReference Include="System.Private.CoreLib" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uapaot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uapaot-Windows_NT-Release|AnyCPU'" />
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>

View File

@@ -1,229 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using System.Runtime.CompilerServices;
namespace System.Threading.Tasks
{
/// <summary>
/// Provides a set of static (Shared in Visual Basic) methods for working with specific kinds of
/// <see cref="System.Threading.Tasks.Task"/> instances.
/// </summary>
public static class TaskExtensions
{
/// <summary>
/// Creates a proxy <see cref="System.Threading.Tasks.Task">Task</see> that represents the
/// asynchronous operation of a Task{Task}.
/// </summary>
/// <remarks>
/// It is often useful to be able to return a Task from a <see cref="System.Threading.Tasks.Task{TResult}">
/// Task{TResult}</see>, where the inner Task represents work done as part of the outer Task{TResult}. However,
/// doing so results in a Task{Task}, which, if not dealt with carefully, could produce unexpected behavior. Unwrap
/// solves this problem by creating a proxy Task that represents the entire asynchronous operation of such a Task{Task}.
/// </remarks>
/// <param name="task">The Task{Task} to unwrap.</param>
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown if the
/// <paramref name="task"/> argument is null.</exception>
/// <returns>A Task that represents the asynchronous operation of the provided Task{Task}.</returns>
public static Task Unwrap(this Task<Task> task)
{
if (task == null)
throw new ArgumentNullException(nameof(task));
// Fast path for an already successfully completed outer task: just return the inner one.
// As in the subsequent slower path, a null inner task is special-cased to mean cancellation.
if (task.Status == TaskStatus.RanToCompletion && (task.CreationOptions & TaskCreationOptions.AttachedToParent) == 0)
{
return task.Result ?? Task.FromCanceled(new CancellationToken(true));
}
// Create a new Task to serve as a proxy for the actual inner task. Attach it
// to the parent if the original was attached to the parent.
var tcs = new TaskCompletionSource<VoidResult>(task.CreationOptions & TaskCreationOptions.AttachedToParent);
TransferAsynchronously(tcs, task);
return tcs.Task;
}
/// <summary>
/// Creates a proxy <see cref="System.Threading.Tasks.Task{TResult}">Task{TResult}</see> that represents the
/// asynchronous operation of a Task{Task{TResult}}.
/// </summary>
/// <remarks>
/// It is often useful to be able to return a Task{TResult} from a Task{TResult}, where the inner Task{TResult}
/// represents work done as part of the outer Task{TResult}. However, doing so results in a Task{Task{TResult}},
/// which, if not dealt with carefully, could produce unexpected behavior. Unwrap solves this problem by
/// creating a proxy Task{TResult} that represents the entire asynchronous operation of such a Task{Task{TResult}}.
/// </remarks>
/// <param name="task">The Task{Task{TResult}} to unwrap.</param>
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown if the
/// <paramref name="task"/> argument is null.</exception>
/// <returns>A Task{TResult} that represents the asynchronous operation of the provided Task{Task{TResult}}.</returns>
public static Task<TResult> Unwrap<TResult>(this Task<Task<TResult>> task)
{
if (task == null)
throw new ArgumentNullException(nameof(task));
// Fast path for an already successfully completed outer task: just return the inner one.
// As in the subsequent slower path, a null inner task is special-cased to mean cancellation.
if (task.Status == TaskStatus.RanToCompletion && (task.CreationOptions & TaskCreationOptions.AttachedToParent) == 0)
{
return task.Result ?? Task.FromCanceled<TResult>(new CancellationToken(true));
}
// Create a new Task to serve as a proxy for the actual inner task. Attach it
// to the parent if the original was attached to the parent.
var tcs = new TaskCompletionSource<TResult>(task.CreationOptions & TaskCreationOptions.AttachedToParent);
TransferAsynchronously(tcs, task);
return tcs.Task;
}
/// <summary>
/// Transfer the results of the <paramref name="outer"/> task's inner task to the <paramref name="completionSource"/>.
/// </summary>
/// <param name="completionSource">The completion source to which results should be transfered.</param>
/// <param name="outer">
/// The outer task that when completed will yield an inner task whose results we want marshaled to the <paramref name="completionSource"/>.
/// </param>
private static void TransferAsynchronously<TResult, TInner>(TaskCompletionSource<TResult> completionSource, Task<TInner> outer) where TInner : Task
{
Action callback = null;
// Create a continuation delegate. For performance reasons, we reuse the same delegate/closure across multiple
// continuations; by using .ConfigureAwait(false).GetAwaiter().UnsafeOnComplete(action), in most cases
// this delegate can be stored directly into the Task's continuation field, eliminating the need for additional
// allocations. Thus, this whole Unwrap operation generally results in four allocations: one for the TaskCompletionSource,
// one for the returned task, one for the delegate, and one for the closure. Since the delegate is used
// across multiple continuations, we use the callback variable as well to indicate which continuation we're in:
// if the callback is non-null, then we're processing the continuation for the outer task and use the callback
// object as the continuation off of the inner task; if the callback is null, then we're processing the
// inner task.
callback = delegate
{
Debug.Assert(outer.IsCompleted);
if (callback != null)
{
// Process the outer task's completion
// Clear out the callback field to indicate that any future invocations should
// be for processing the inner task, but store away a local copy in case we need
// to use it as the continuation off of the outer task.
Action innerCallback = callback;
callback = null;
bool result = true;
switch (outer.Status)
{
case TaskStatus.Canceled:
case TaskStatus.Faulted:
// The outer task has completed as canceled or faulted; transfer that
// status to the completion source, and we're done.
result = completionSource.TrySetFromTask(outer);
break;
case TaskStatus.RanToCompletion:
Task inner = outer.Result;
if (inner == null)
{
// The outer task completed successfully, but with a null inner task;
// cancel the completionSource, and we're done.
result = completionSource.TrySetCanceled();
}
else if (inner.IsCompleted)
{
// The inner task also completed! Transfer the results, and we're done.
result = completionSource.TrySetFromTask(inner);
}
else
{
// Run this delegate again once the inner task has completed.
inner.ConfigureAwait(false).GetAwaiter().UnsafeOnCompleted(innerCallback);
}
break;
}
Debug.Assert(result);
}
else
{
// Process the inner task's completion. All we need to do is transfer its results
// to the completion source.
Debug.Assert(outer.Status == TaskStatus.RanToCompletion);
Debug.Assert(outer.Result.IsCompleted);
completionSource.TrySetFromTask(outer.Result);
}
};
// Kick things off by hooking up the callback as the task's continuation
outer.ConfigureAwait(false).GetAwaiter().UnsafeOnCompleted(callback);
}
/// <summary>Copies that ending state information from <paramref name="task"/> to <paramref name="completionSource"/>.</summary>
private static bool TrySetFromTask<TResult>(this TaskCompletionSource<TResult> completionSource, Task task)
{
Debug.Assert(task.IsCompleted);
// Before transferring the results, check to make sure we're not too deep on the stack. Calling TrySet*
// will cause any synchronous continuations to be invoked, which is fine unless we're so deep that doing
// so overflows. ContinueWith has built-in support for avoiding such stack dives, but that support is not
// (yet) part of await's infrastructure, so until it is we mimic it manually. This matches the behavior
// employed by the Unwrap implementation in mscorlib.
if (!RuntimeHelpers.TryEnsureSufficientExecutionStack())
{
// This is very rare. We're too deep to safely invoke
// TrySet* synchronously, so do so asynchronously instead.
Task.Factory.StartNew(s =>
{
var t = (Tuple<TaskCompletionSource<TResult>, Task>)s;
TrySetFromTask(t.Item1, t.Item2);
}, Tuple.Create(completionSource, task), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
return true;
}
// Transfer the results from the supplied Task to the TaskCompletionSource.
bool result = false;
switch(task.Status)
{
case TaskStatus.Canceled:
result = completionSource.TrySetCanceled(ExtractCancellationToken(task));
break;
case TaskStatus.Faulted:
result = completionSource.TrySetException(task.Exception.InnerExceptions);
break;
case TaskStatus.RanToCompletion:
Task<TResult> resultTask = task as Task<TResult>;
result = resultTask != null ?
completionSource.TrySetResult(resultTask.Result) :
completionSource.TrySetResult(default(TResult));
break;
}
return result;
}
/// <summary>Gets the CancellationToken associated with a canceled task.</summary>
private static CancellationToken ExtractCancellationToken(Task task)
{
// With the public Task APIs as of .NET 4.6, the only way to extract a CancellationToken
// that was associated with a Task is by await'ing it, catching the resulting
// OperationCanceledException, and getting the token from the OCE.
Debug.Assert(task.IsCanceled);
try
{
task.GetAwaiter().GetResult();
Debug.Fail("Waiting on the canceled task should always result in an OCE, even if it's manufactured at the time of the wait.");
return new CancellationToken(true);
}
catch (OperationCanceledException oce)
{
// This token may not have cancellation requested; that's ok.
// That can happen if, for example, the Task is canceled with
// TaskCompletionSource<T>.SetCanceled(), without a token.
return oce.CancellationToken;
}
}
/// <summary>Dummy type to use as a void TResult.</summary>
private struct VoidResult { }
}
}

View File

@@ -1,72 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Threading.Tasks
{
/// <summary>
/// Provides a set of static (Shared in Visual Basic) methods for working with specific kinds of
/// <see cref="System.Threading.Tasks.Task"/> instances.
/// </summary>
public static class TaskExtensions
{
/// <summary>
/// Creates a proxy <see cref="System.Threading.Tasks.Task">Task</see> that represents the
/// asynchronous operation of a Task{Task}.
/// </summary>
/// <remarks>
/// It is often useful to be able to return a Task from a <see cref="System.Threading.Tasks.Task{TResult}">
/// Task{TResult}</see>, where the inner Task represents work done as part of the outer Task{TResult}. However,
/// doing so results in a Task{Task}, which, if not dealt with carefully, could produce unexpected behavior. Unwrap
/// solves this problem by creating a proxy Task that represents the entire asynchronous operation of such a Task{Task}.
/// </remarks>
/// <param name="task">The Task{Task} to unwrap.</param>
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown if the
/// <paramref name="task"/> argument is null.</exception>
/// <returns>A Task that represents the asynchronous operation of the provided Task{Task}.</returns>
public static Task Unwrap(this Task<Task> task)
{
if (task == null)
{
throw new ArgumentNullException(nameof(task));
}
// Creates a proxy Task and hooks up the logic to have it represent the task.Result
Task promise = Task.CreateUnwrapPromise<VoidResult>(task, lookForOce: false);
// Return the proxy immediately
return promise;
}
/// <summary>
/// Creates a proxy <see cref="System.Threading.Tasks.Task{TResult}">Task{TResult}</see> that represents the
/// asynchronous operation of a Task{Task{TResult}}.
/// </summary>
/// <remarks>
/// It is often useful to be able to return a Task{TResult} from a Task{TResult}, where the inner Task{TResult}
/// represents work done as part of the outer Task{TResult}. However, doing so results in a Task{Task{TResult}},
/// which, if not dealt with carefully, could produce unexpected behavior. Unwrap solves this problem by
/// creating a proxy Task{TResult} that represents the entire asynchronous operation of such a Task{Task{TResult}}.
/// </remarks>
/// <param name="task">The Task{Task{TResult}} to unwrap.</param>
/// <exception cref="T:System.ArgumentNullException">The exception that is thrown if the
/// <paramref name="task"/> argument is null.</exception>
/// <returns>A Task{TResult} that represents the asynchronous operation of the provided Task{Task{TResult}}.</returns>
public static Task<TResult> Unwrap<TResult>(this Task<Task<TResult>> task)
{
if (task == null)
{
throw new ArgumentNullException(nameof(task));
}
// Creates a proxy Task<TResult> and hooks up the logic to have it represent the task.Result
Task<TResult> promise = Task.CreateUnwrapPromise<TResult>(task, lookForOce: false);
// Return the proxy immediately
return promise;
}
// Used as a placeholder TResult to indicate that a Task<TResult> has a void TResult
private struct VoidResult { }
}
}

View File

@@ -39,10 +39,10 @@ namespace System.Threading.Tasks.Tests
[SecurityCritical]
protected override void QueueTask(Task task)
{
if (task == null) throw new ArgumentNullException("When reqeusting to QueueTask, the input task can not be null");
if (task == null) throw new ArgumentNullException("When requesting to QueueTask, the input task can not be null");
Task.Factory.StartNew(() =>
{
lock (_lockObj) //Locking so that if mutliple threads in threadpool does not incorrectly increment the counter.
lock (_lockObj) //Locking so that if multiple threads in threadpool does not incorrectly increment the counter.
{
//store the current value of the counter (This becomes the unique ID for this scheduler's Task)
SchedulerID.Value = _counter;
@@ -75,7 +75,7 @@ namespace System.Threading.Tasks.Tests
[SecurityCritical]
protected override IEnumerable<Task> GetScheduledTasks() { return null; }
private Object _lockObj = new Object();
private int _counter = 1; //This is used ot keep track of how many scheduler tasks were created
private int _counter = 1; //This is used to keep track of how many scheduler tasks were created
public ThreadLocal<int> SchedulerID = new ThreadLocal<int>(); //This is the ID of the scheduler.
/// <summary>The maximum concurrency level for the scheduler.</summary>
@@ -136,7 +136,7 @@ namespace System.Threading.Tasks.Tests
for (int i = 0; i < 50; i++)
{
//In the current design, when there are no more tasks to execute, the Task used by concurrentexclusive scheduler dies
//by sleeping we simulate some non trival work that takes time and causes the concurrentexclusive scheduler Task
//by sleeping we simulate some non trivial work that takes time and causes the concurrentexclusive scheduler Task
//to stay around for addition work.
taskList.Add(readers.StartNew(() => { var sw = new SpinWait(); while (!sw.NextSpinWillYield) sw.SpinOnce() ; }));
}
@@ -182,7 +182,7 @@ namespace System.Threading.Tasks.Tests
}
/// <summary>
/// Test to verify that only upto maxItemsPerTask are executed by a single ConcurrentExclusiveScheduler Task
/// Test to verify that only up to maxItemsPerTask are executed by a single ConcurrentExclusiveScheduler Task
/// </summary>
/// <remarks>In ConcurrentExclusiveSchedulerPair, each tasks scheduled are run under an internal Task. The basic idea for the test
/// is that each time ConcurrentExclusiveScheduler is called QueueTasK a counter (which acts as scheduler's Task id) is incremented.
@@ -260,7 +260,7 @@ namespace System.Threading.Tasks.Tests
}
/// <summary>
/// When user specfices a concurrency level above the level allowed by the task scheduler, the concurrency level should be set
/// When user specifies a concurrency level above the level allowed by the task scheduler, the concurrency level should be set
/// to the concurrencylevel specified in the taskscheduler. Also tests that the maxConcurrencyLevel specified was respected
/// </summary>
[Fact]

View File

@@ -817,6 +817,12 @@ namespace System.Threading.Tasks.Tests
}
}
[System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
static void FinalizeHelper(DisposeTracker disposeTracker)
{
new DerivedCTS(disposeTracker);
}
// Several tests for deriving custom user types from CancellationTokenSource
[Fact]
public static void DerivedCancellationTokenSource()
@@ -873,9 +879,7 @@ namespace System.Threading.Tasks.Tests
{
var disposeTracker = new DisposeTracker();
// Since the object is not assigned into a variable, it can be GC'd before the current method terminates.
// (This is only an issue in the Debug build)
new DerivedCTS(disposeTracker);
FinalizeHelper(disposeTracker);
// Wait until the DerivedCTS object is finalized
SpinWait.SpinUntil(() =>

View File

@@ -2,7 +2,6 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netstandard1.5;
netstandard;
</BuildConfigurations>
</PropertyGroup>

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.Threading.Tasks.Tests.csproj" />
<Project Include="System.Threading.Tasks.Tests.csproj">
<TargetGroup>netstandard1.5</TargetGroup>
<TestTFMs>netcoreapp1.0</TestTFMs>
</Project>
<Project Include="System.Threading.Tasks.Tests.csproj">
<TargetGroup>netstandard1.5</TargetGroup>
<OSGroup>Windows_NT</OSGroup>
<TestTFMs>net462</TestTFMs>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

View File

@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<ProjectGuid>{B6C09633-D161-499A-8FE1-46B2D53A16E7}</ProjectGuid>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard1.5-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard1.5-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netstandard-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="XunitAssemblyAttributes.cs" />
<Compile Include="UnwrapTests.cs" />
@@ -51,8 +49,8 @@
<Link>CommonTest\System\Threading\ThreadPoolHelpers.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
<ItemGroup>
<Compile Include="Task\TaskDisposeTests.netstandard.cs" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
</Project>

View File

@@ -18,7 +18,7 @@ using System.Diagnostics;
namespace System.Threading.Tasks.Tests
{
/// <summary>
/// A class that implements the APM pattern to ensure that TPL can support APM patttern
/// A class that implements the APM pattern to ensure that TPL can support APM pattern
/// </summary>
public sealed class TaskAPMTests : IDisposable
{

View File

@@ -105,7 +105,7 @@ namespace System.Threading.Tasks.Tests.CancelWait
if (delta > 0)
{
Debug.WriteLine("ElapsedMilliseconds way more than requested Timeout.");
Debug.WriteLine("WaitTime= {0} ms, ElapsedTime= {1} ms, Allowed Descrepancy = {2} ms", _waitTimeout, sw.ElapsedMilliseconds, s_deltaTimeOut);
Debug.WriteLine("WaitTime= {0} ms, ElapsedTime= {1} ms, Allowed Discrepancy = {2} ms", _waitTimeout, sw.ElapsedMilliseconds, s_deltaTimeOut);
Debug.WriteLine("Delta= {0} ms", delta);
}
else
@@ -237,7 +237,7 @@ namespace System.Threading.Tasks.Tests.CancelWait
break;
default:
throw new ArgumentOutOfRangeException(string.Format("unknown API_CancelWait of", _api));
throw new ArgumentOutOfRangeException(string.Format("unknown API_CancelWait of {0}", _api));
}
}
@@ -259,7 +259,7 @@ namespace System.Threading.Tasks.Tests.CancelWait
{
// need to make sure the parent task at least called .Cancel() on the child
if (!ti.CancellationToken.IsCancellationRequested)
Assert.True(false, string.Format("Task which has been explictly cancel-requested either by parent must have CancellationRequested set as true"));
Assert.True(false, string.Format("Task which has been explicitly cancel-requested either by parent must have CancellationRequested set as true"));
}
else if (ti.IsRespectParentCancellation)
{
@@ -459,7 +459,7 @@ namespace System.Threading.Tasks.Tests.CancelWait
int index = -1;
for (int i = 0; i < options.Length; i++)
{
string o = options[i].Trim(); // remove any white spaces.
string o = options[i].Trim(); // remove any whitespace.
options[i] = o;
if (o.Equals("RespectParentCancellation", StringComparison.OrdinalIgnoreCase))
{
@@ -570,7 +570,7 @@ namespace System.Threading.Tasks.Tests.CancelWait
#region Helper Methods
/// <summary>
/// Recursively traverse the tree and compare the current node usign the predicate
/// Recursively traverse the tree and compare the current node using the predicate
/// </summary>
/// <param name="predicate">the predicate</param>
/// <param name="report"></param>

View File

@@ -50,7 +50,7 @@ namespace Test
{
bool useFutureFactory = (z == 0);
// This would be a non-sensical combination
// This would be a nonsensical combination
if (useFutureFactory && !continuationIsFuture)
continue;

View File

@@ -44,7 +44,7 @@ namespace System.Threading.Tasks.Tests.ContinueWithAllAny
_tcOption = parameters.ContinuationOptions;
// set up the TaskScheduler under which the contination will be scheduled
// set up the TaskScheduler under which the continuation will be scheduled
_tm = TaskScheduler.Default;
// create a new cancellation token for each test
@@ -119,7 +119,7 @@ namespace System.Threading.Tasks.Tests.ContinueWithAllAny
// and map it to one of the things this is running.
//
// That is, given a task type, tm type, api, cancellation, etc. it should be
// straightforward to figure out what variant of continuewhen is called.
// straightforward to figure out what variant of ContinueWhen is called.
//
switch (_taskType)
{

View File

@@ -682,7 +682,7 @@ namespace System.Threading.Tasks.Tests
Debug.WriteLine("RunUnwrapTests: Waiting on Unwrap() products... If we hang, something is wrong.");
Task.WaitAll(new Task[] { c1, c2, c3, c4, c5, c6, c7, c8 });
//Debug.WriteLine(" Testing that Unwrap() producs have consistent completion state...");
//Debug.WriteLine(" Testing that Unwrap() products have consistent completion state...");
checkCompletionState(c1, true, "Task ==> Task<T>, Unwrapped task complete");
checkCompletionState(c2, true, "Task<T> ==> Task<T>, Unwrapped task complete");
checkCompletionState(c3, true, "StartNew ==> Task<T>, Unwrapped task complete");
@@ -865,7 +865,7 @@ namespace System.Threading.Tasks.Tests
{
if (ae.InnerExceptions.Count != 4)
{
Assert.True(false, string.Format("RunUnwrapTests: > FAILED. Monadic continuation w/ faulted childred had {0} inner exceptions, expected 4", ae.InnerExceptions.Count));
Assert.True(false, string.Format("RunUnwrapTests: > FAILED. Monadic continuation w/ faulted children had {0} inner exceptions, expected 4", ae.InnerExceptions.Count));
Assert.True(false, string.Format("RunUnwrapTests: > Exception = {0}", ae));
}
}
@@ -1030,7 +1030,7 @@ namespace System.Threading.Tasks.Tests
bool t3Ran = false;
Task t1 = new Task(delegate { t1Ran = true; });
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
CancellationTokenSource ctsForT2 = new CancellationTokenSource();
Task t2 = t1.ContinueWith((ContinuedTask, obj) =>
{
@@ -1336,7 +1336,7 @@ namespace System.Threading.Tasks.Tests
TaskContinuationOptions tco = ((i % 2) == 0) ? TaskContinuationOptions.None : TaskContinuationOptions.ExecuteSynchronously;
normalContinuations[i] = antecedent.ContinueWith(normalAction, tco);
// If you've hit completeAfter or cancelAfter, take the approriate action
// If you've hit completeAfter or cancelAfter, take the appropriate action
if ((i + 1) == completeAfter) completionTcs.TrySetResult(true); // Asynchronously completes the antecedent
if ((i + 1) == cancelAfter) cancellationTcs.TrySetResult(true); // Asynchronously initiates cancellation of "to be canceled" tasks
}
@@ -1424,7 +1424,7 @@ namespace System.Threading.Tasks.Tests
TaskCompletionSource<int> result, TaskScheduler scheduler)
{
// If the cancellation token is already canceled, there is no need to create and link a target.
// Insted, directly return a canceled task
// Instead, directly return a canceled task
if (cts.IsCancellationRequested)
{
var canceledTaskSource = new TaskCompletionSource<object>();

View File

@@ -202,7 +202,7 @@ namespace Test
// Pre-increment the dontCounts for pre-canceled continuations to make final check easier
// (i.e., all counts should be 1 at end).
int[] doneCount = { 0, 0, 1, 0, 1, 0 };
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
Task t1 = new Task(delegate { doneCount[0]++; });
Task c1 = t1.ContinueWith((_, obj) => { doneCount[1]++; }, stateParam);
@@ -271,7 +271,7 @@ namespace Test
int x = 0;
int y = 0;
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
Task t1 = new Task(delegate { x = 1; });
Task t2 = t1.ContinueWith(delegate (Task t, Object obj) { y = 1; }, stateParam);
Task<int> t3 = t2.ContinueWith(delegate (Task t, Object obj) { return 5; }, stateParam);
@@ -317,7 +317,7 @@ namespace Test
try
{
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
Task t2 = t1.ContinueWith((completedTask, obj) => { }, stateParam);
}
catch
@@ -329,7 +329,7 @@ namespace Test
[Fact]
public static void RunContinueWithParamsTest_State_Cancellation()
{
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
//
// Test whether parentage/cancellation is working correctly
@@ -380,7 +380,7 @@ namespace Test
public static void RunContinueWithParamsTest_State_IllegalParameters()
{
Task t1 = new Task(delegate { });
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
try
{
@@ -421,7 +421,7 @@ namespace Test
{
bool ran = false;
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
if (runNegativeCases)
{
@@ -455,7 +455,7 @@ namespace Test
bool ran = false;
Debug.WriteLine("* RunContinueWithTaskFuture_StateA(Object, options={0})", options);
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
if (runNegativeCases)
{
@@ -489,7 +489,7 @@ namespace Test
bool ran = false;
Debug.WriteLine("* RunContinueWithFutureTask_State(Object, options={0})", options);
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
if (runNegativeCases)
{
@@ -523,7 +523,7 @@ namespace Test
bool ran = false;
Debug.WriteLine("* RunContinueWithFutureFuture_StateA(Object, options={0})", options);
string stateParam = "test"; //used as a state parametr for the continuation if the useStateParam is true
string stateParam = "test"; //used as a state parameter for the continuation if the useStateParam is true
if (runNegativeCases)
{
RunContinueWithBase_ExceptionCases(options,

Some files were not shown because too many files have changed in this diff Show More