Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Commit

Permalink
Add ValueTuple to .NET Standard 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
weshaggard committed Mar 30, 2017
1 parent 8912f05 commit 6e57138
Show file tree
Hide file tree
Showing 21 changed files with 660 additions and 12 deletions.
1 change: 1 addition & 0 deletions apicompat/netstandard1x/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"System.Threading.Thread": "4.3.0",
"System.Threading.ThreadPool": "4.3.0",
"System.Threading.Timer": "4.3.0",
"System.ValueTuple": "4.3.0",
"System.Xml.ReaderWriter": "4.3.0",
"System.Xml.XDocument": "4.3.0",
"System.Xml.XmlDocument": "4.3.0",
Expand Down
1 change: 1 addition & 0 deletions netstandard/pkg/shims/dir.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<PropertyGroup>
<AssemblyOriginatorKeyFile Condition="'$(UseOpenKey)' == 'true'">$(ToolsDir)Open.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile Condition="'$(UseECMAKey)' == 'true'">$(ToolsDir)ECMA.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile Condition="'$(UseMSFTKey)' == 'true'">$(ToolsDir)MSFT.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile Condition="'$(UseWinFxKey)' == 'true'">$(ProjectDir)platforms/winfx.pub</AssemblyOriginatorKeyFile>
Expand Down
4 changes: 4 additions & 0 deletions netstandard/pkg/shims/generateshims.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ foreach ($shim in $shimList)
{
$token = "UseECMAKey";
}
elseif ($asmToken -eq "cc")
{
$token = "UseOpenKey";
}
elseif ($asmToken -eq "31")
{
$token = "UseWinFxKey";
Expand Down
Binary file modified netstandard/pkg/shims/netstandard.shimlist.txt
Binary file not shown.
11 changes: 11 additions & 0 deletions netstandard/pkg/shims/netstandard/System.ValueTuple.Forwards.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.TupleExtensions))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple<,,,,,,,>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TupleElementNamesAttribute))]
14 changes: 14 additions & 0 deletions netstandard/pkg/shims/netstandard/System.ValueTuple.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.ValueTuple</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<UseOpenKey>true</UseOpenKey>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.ValueTuple.Forwards.cs" />
<ProjectReference Include="..\..\..\ref\netstandard.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
211 changes: 211 additions & 0 deletions netstandard/pkg/shims/netstandardAPIList.txt

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions netstandard/ref/System.ValueTuple.cs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions netstandard/ref/netstandard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Compile Include="System.Numerics.cs" />
<Compile Include="System.Runtime.Serialization.cs" />
<Compile Include="System.Transactions.cs" />
<Compile Include="System.ValueTuple.cs" />
<Compile Include="System.Web.cs" />
<Compile Include="System.Xml.cs" />
<Compile Include="System.Xml.Linq.cs" />
Expand Down
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.net461.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ Compat issues with assembly netstandard:
MembersMustExist : Member 'System.AppContext.GetData(System.String)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.AppContext.TargetFrameworkName.get()' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.StringNormalizationExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Data.Common.DbColumn' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Data.Common.DbDataReaderExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Data.Common.IDbColumnSchemaGenerator' does not exist in the implementation but it does exist in the contract.
Expand Down Expand Up @@ -31,6 +41,7 @@ MembersMustExist : Member 'System.Net.Http.HttpClientHandler.SslProtocols.set(Sy
TypesMustExist : Type 'System.Net.Sockets.SocketReceiveFromResult' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Net.Sockets.SocketReceiveMessageFromResult' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Net.Sockets.SocketTaskExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.Serialization.DataContractSerializerExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.Serialization.ISerializationSurrogateProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.SecureStringMarshal' does not exist in the implementation but it does exist in the contract.
Expand All @@ -51,4 +62,4 @@ MembersMustExist : Member 'System.Text.RegularExpressions.Regex.Caps.set(System.
TypesMustExist : Type 'System.Threading.PreAllocatedOverlapped' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Threading.ThreadPoolBoundHandle' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Xml.XPath.XDocumentExtensions' does not exist in the implementation but it does exist in the contract.
Total Issues: 52
Total Issues: 63
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.xamarin.android.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Compat issues with assembly netstandard:
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA256CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA384CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA512CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
Total Issues: 3
Total Issues: 14
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.xamarin.ios.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Compat issues with assembly netstandard:
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA256CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA384CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA512CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
Total Issues: 3
Total Issues: 14
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.xamarin.mac.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Compat issues with assembly netstandard:
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA256CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA384CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA512CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
Total Issues: 3
Total Issues: 14
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.xamarin.tvos.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Compat issues with assembly netstandard:
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA256CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA384CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA512CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
Total Issues: 3
Total Issues: 14
13 changes: 12 additions & 1 deletion netstandard/src/ApiCompatBaseline.xamarin.watchos.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Compat issues with assembly netstandard:
TypesMustExist : Type 'System.TupleExtensions' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA256CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA384CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Security.Cryptography.SHA512CryptoServiceProvider' does not exist in the implementation but it does exist in the contract.
Total Issues: 3
Total Issues: 14
14 changes: 13 additions & 1 deletion netstandard/src/GenApi.exclude.net461.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@ T:System.Security.Cryptography.IncrementalHash
T:System.Security.Cryptography.TripleDESCng
T:System.Threading.PreAllocatedOverlapped
T:System.Threading.ThreadPoolBoundHandle
T:System.Xml.XPath.XDocumentExtensions
T:System.Xml.XPath.XDocumentExtensions
T:System.TupleExtensions
T:System.ValueTuple
T:System.ValueTuple`1
T:System.ValueTuple`1
T:System.ValueTuple`2
T:System.ValueTuple`3
T:System.ValueTuple`4
T:System.ValueTuple`5
T:System.ValueTuple`6
T:System.ValueTuple`7
T:System.ValueTuple`8
T:System.Runtime.CompilerServices.TupleElementNamesAttribute
14 changes: 13 additions & 1 deletion netstandard/src/GenApi.exclude.xamarin.android.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
T:System.Security.Cryptography.SHA256CryptoServiceProvider
T:System.Security.Cryptography.SHA384CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.TupleExtensions
T:System.ValueTuple
T:System.ValueTuple`1
T:System.ValueTuple`1
T:System.ValueTuple`2
T:System.ValueTuple`3
T:System.ValueTuple`4
T:System.ValueTuple`5
T:System.ValueTuple`6
T:System.ValueTuple`7
T:System.ValueTuple`8
T:System.Runtime.CompilerServices.TupleElementNamesAttribute
14 changes: 13 additions & 1 deletion netstandard/src/GenApi.exclude.xamarin.ios.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
T:System.Security.Cryptography.SHA256CryptoServiceProvider
T:System.Security.Cryptography.SHA384CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.TupleExtensions
T:System.ValueTuple
T:System.ValueTuple`1
T:System.ValueTuple`1
T:System.ValueTuple`2
T:System.ValueTuple`3
T:System.ValueTuple`4
T:System.ValueTuple`5
T:System.ValueTuple`6
T:System.ValueTuple`7
T:System.ValueTuple`8
T:System.Runtime.CompilerServices.TupleElementNamesAttribute
14 changes: 13 additions & 1 deletion netstandard/src/GenApi.exclude.xamarin.mac.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
T:System.Security.Cryptography.SHA256CryptoServiceProvider
T:System.Security.Cryptography.SHA384CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.TupleExtensions
T:System.ValueTuple
T:System.ValueTuple`1
T:System.ValueTuple`1
T:System.ValueTuple`2
T:System.ValueTuple`3
T:System.ValueTuple`4
T:System.ValueTuple`5
T:System.ValueTuple`6
T:System.ValueTuple`7
T:System.ValueTuple`8
T:System.Runtime.CompilerServices.TupleElementNamesAttribute
14 changes: 13 additions & 1 deletion netstandard/src/GenApi.exclude.xamarin.tvos.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
T:System.Security.Cryptography.SHA256CryptoServiceProvider
T:System.Security.Cryptography.SHA384CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.Security.Cryptography.SHA512CryptoServiceProvider
T:System.TupleExtensions
T:System.ValueTuple
T:System.ValueTuple`1
T:System.ValueTuple`1
T:System.ValueTuple`2
T:System.ValueTuple`3
T:System.ValueTuple`4
T:System.ValueTuple`5
T:System.ValueTuple`6
T:System.ValueTuple`7
T:System.ValueTuple`8
T:System.Runtime.CompilerServices.TupleElementNamesAttribute
Loading

0 comments on commit 6e57138

Please sign in to comment.