diff --git a/src/System.ValueTuple/System.ValueTuple.sln b/src/System.ValueTuple/System.ValueTuple.sln
new file mode 100644
index 000000000..a42a52b15
--- /dev/null
+++ b/src/System.ValueTuple/System.ValueTuple.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.ValueTuple.Tests", "tests\System.ValueTuple.Tests.csproj", "{CBD5AE8D-8595-48E2-848F-1A3492A28FDB}"
+ ProjectSection(ProjectDependencies) = postProject
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29} = {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.ValueTuple", "src\System.ValueTuple.csproj", "{4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}"
+ ProjectSection(ProjectDependencies) = postProject
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D} = {11AE73F7-3532-47B9-8FF6-B4F22D76456D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.ValueTuple", "ref\System.ValueTuple.csproj", "{11AE73F7-3532-47B9-8FF6-B4F22D76456D}"
+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
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
+ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
+ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
+ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {CBD5AE8D-8595-48E2-848F-1A3492A28FDB} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
+ EndGlobalSection
+EndGlobal
diff --git a/src/System.ValueTuple/dir.props b/src/System.ValueTuple/dir.props
new file mode 100644
index 000000000..637f027be
--- /dev/null
+++ b/src/System.ValueTuple/dir.props
@@ -0,0 +1,10 @@
+
+
+
+
+ 4.0.3.0
+ Open
+ true
+ true
+
+
\ No newline at end of file
diff --git a/src/System.ValueTuple/pkg/System.ValueTuple.pkgproj b/src/System.ValueTuple/pkg/System.ValueTuple.pkgproj
new file mode 100644
index 000000000..405cb5152
--- /dev/null
+++ b/src/System.ValueTuple/pkg/System.ValueTuple.pkgproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ net45;netcore45;netcoreapp2.1;wp8;wpa81;$(AllXamarinFrameworks)
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/System.ValueTuple/ref/Configurations.props b/src/System.ValueTuple/ref/Configurations.props
new file mode 100644
index 000000000..c1545db6c
--- /dev/null
+++ b/src/System.ValueTuple/ref/Configurations.props
@@ -0,0 +1,15 @@
+
+
+
+
+ portable_net40+sl4+win8+wp8;
+ netfx;
+ net47;
+
+
+ $(PackageConfigurations);
+ netcoreapp;
+ uap;
+
+
+
diff --git a/src/System.ValueTuple/ref/System.Runtime.CompilerServices.ReferenceAssemblyAttribute.cs b/src/System.ValueTuple/ref/System.Runtime.CompilerServices.ReferenceAssemblyAttribute.cs
new file mode 100644
index 000000000..60c6795f7
--- /dev/null
+++ b/src/System.ValueTuple/ref/System.Runtime.CompilerServices.ReferenceAssemblyAttribute.cs
@@ -0,0 +1,17 @@
+// 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.Runtime.CompilerServices
+{
+ using System;
+
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
+ internal sealed class ReferenceAssemblyAttribute : Attribute
+ {
+ internal ReferenceAssemblyAttribute() { }
+ internal ReferenceAssemblyAttribute(String description) { throw null; }
+ internal String Description { get { throw null; } }
+ }
+}
\ No newline at end of file
diff --git a/src/System.ValueTuple/ref/System.Security.AllowPartiallyTrustedCallersAttribute.cs b/src/System.ValueTuple/ref/System.Security.AllowPartiallyTrustedCallersAttribute.cs
new file mode 100644
index 000000000..be03c088f
--- /dev/null
+++ b/src/System.ValueTuple/ref/System.Security.AllowPartiallyTrustedCallersAttribute.cs
@@ -0,0 +1,25 @@
+// 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.Security
+{
+ [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
+ sealed internal class AllowPartiallyTrustedCallersAttribute : System.Attribute
+ {
+ internal AllowPartiallyTrustedCallersAttribute() { throw null; }
+
+ internal PartialTrustVisibilityLevel PartialTrustVisibilityLevel
+ {
+ get { throw null; }
+ set { throw null; }
+ }
+ }
+
+ internal enum PartialTrustVisibilityLevel
+ {
+ VisibleToAllHosts = 0,
+ NotVisibleByDefault = 1
+ }
+}
diff --git a/src/System.ValueTuple/ref/System.ValueTuple.TypeForwards.cs b/src/System.ValueTuple/ref/System.ValueTuple.TypeForwards.cs
new file mode 100644
index 000000000..9cc9fc667
--- /dev/null
+++ b/src/System.ValueTuple/ref/System.ValueTuple.TypeForwards.cs
@@ -0,0 +1,15 @@
+// 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.
+
+[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.TupleExtensions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.TupleElementNamesAttribute))]
diff --git a/src/System.ValueTuple/ref/System.ValueTuple.cs b/src/System.ValueTuple/ref/System.ValueTuple.cs
new file mode 100644
index 000000000..0d8b4118e
--- /dev/null
+++ b/src/System.ValueTuple/ref/System.ValueTuple.cs
@@ -0,0 +1,681 @@
+// 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.
+// ------------------------------------------------------------------------------
+// Changes to this file must follow the http://aka.ms/api-review process.
+// ------------------------------------------------------------------------------
+
+namespace System
+{
+ public struct ValueTuple
+ : IEquatable, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable
+ {
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ public static ValueTuple Create() { throw null; }
+ public static ValueTuple Create(T1 item1) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2, T3 item3) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2, T3 item3, T4 item4) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) { throw null; }
+ public static ValueTuple Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) { throw null; }
+ public static ValueTuple> Create(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8) { throw null; }
+ }
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public ValueTuple(T1 item1) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public ValueTuple(T1 item1, T2 item2) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public ValueTuple(T1 item1, T2 item2, T3 item3) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public T4 Item4;
+ public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public T4 Item4;
+ public T5 Item5;
+ public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public T4 Item4;
+ public T5 Item5;
+ public T6 Item6;
+ public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public T4 Item4;
+ public T5 Item5;
+ public T6 Item6;
+ public T7 Item7;
+ public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+ [Runtime.InteropServices.StructLayout(Runtime.InteropServices.LayoutKind.Auto)]
+ public struct ValueTuple
+ : IEquatable>, Collections.IStructuralEquatable, Collections.IStructuralComparable, IComparable, IComparable>
+ where TRest : struct
+ {
+ public T1 Item1;
+ public T2 Item2;
+ public T3 Item3;
+ public T4 Item4;
+ public T5 Item5;
+ public T6 Item6;
+ public T7 Item7;
+ public TRest Rest;
+ public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public bool Equals(ValueTuple other) { throw null; }
+ bool Collections.IStructuralEquatable.Equals(object other, Collections.IEqualityComparer comparer) { throw null; }
+ int IComparable.CompareTo(object other) { throw null; }
+ public int CompareTo(ValueTuple other) { throw null; }
+ int Collections.IStructuralComparable.CompareTo(object other, Collections.IComparer comparer) { throw null; }
+ public override int GetHashCode() { throw null; }
+ int Collections.IStructuralEquatable.GetHashCode(Collections.IEqualityComparer comparer) { throw null; }
+ public override string ToString() { throw null; }
+ }
+}
+
+namespace System
+{
+ using System.ComponentModel;
+ public static class TupleExtensions
+ {
+ #region Deconstruct
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20)
+ {
+ throw null;
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple>> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20, out T21 item21)
+ {
+ throw null;
+ }
+ #endregion
+
+ #region ToValueTuple
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple
+ ToValueTuple(
+ this Tuple value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>
+ ToValueTuple(
+ this Tuple> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+
+ public static ValueTuple>>
+ ToValueTuple(
+ this Tuple>> value)
+ {
+ throw null;
+ }
+ #endregion
+
+ #region ToTuple
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple
+ ToTuple(
+ this ValueTuple value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>
+ ToTuple(
+ this ValueTuple> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+
+ public static Tuple>>
+ ToTuple(
+ this ValueTuple>> value)
+ {
+ throw null;
+ }
+ #endregion
+
+ private static ValueTuple CreateLong(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) where TRest : struct =>
+ new ValueTuple(item1, item2, item3, item4, item5, item6, item7, rest);
+
+ private static Tuple CreateLongRef(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) =>
+ new Tuple(item1, item2, item3, item4, item5, item6, item7, rest);
+ }
+}
+
+namespace System.Runtime.CompilerServices
+{
+ using System.Collections.Generic;
+ [CLSCompliant(false)]
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Event)]
+ public sealed class TupleElementNamesAttribute : Attribute
+ {
+ public TupleElementNamesAttribute(string[] transformNames) { throw null; }
+ public IList TransformNames { get { throw null; } }
+ }
+}
diff --git a/src/System.ValueTuple/ref/System.ValueTuple.csproj b/src/System.ValueTuple/ref/System.ValueTuple.csproj
new file mode 100644
index 000000000..888a39f5a
--- /dev/null
+++ b/src/System.ValueTuple/ref/System.ValueTuple.csproj
@@ -0,0 +1,48 @@
+
+
+
+
+ {11AE73F7-3532-47B9-8FF6-B4F22D76456D}
+ System
+
+ 4.0.3.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Common\System\Reflection\AssemblyMetadataAttribute.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/System.ValueTuple/src/AssemblyInfo.cs b/src/System.ValueTuple/src/AssemblyInfo.cs
new file mode 100644
index 000000000..f790e088a
--- /dev/null
+++ b/src/System.ValueTuple/src/AssemblyInfo.cs
@@ -0,0 +1,7 @@
+// 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.Security;
+
+[assembly: AllowPartiallyTrustedCallers]
\ No newline at end of file
diff --git a/src/System.ValueTuple/src/Configurations.props b/src/System.ValueTuple/src/Configurations.props
new file mode 100644
index 000000000..2081e9167
--- /dev/null
+++ b/src/System.ValueTuple/src/Configurations.props
@@ -0,0 +1,16 @@
+
+
+
+
+ portable_net40+sl4+win8+wp8;
+ netstandard1.0;
+ netfx;
+ net47;
+
+
+ $(PackageConfigurations);
+ netcoreapp;
+ uap-Windows_NT;
+
+
+
diff --git a/src/System.ValueTuple/src/Resources/Strings.resx b/src/System.ValueTuple/src/Resources/Strings.resx
new file mode 100644
index 000000000..8d94b500f
--- /dev/null
+++ b/src/System.ValueTuple/src/Resources/Strings.resx
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ The parameter should be a ValueTuple type of appropriate arity.
+
+
+ The TRest type argument of ValueTuple`8 must be a ValueTuple.
+
+
diff --git a/src/System.ValueTuple/src/System.ValueTuple.csproj b/src/System.ValueTuple/src/System.ValueTuple.csproj
new file mode 100644
index 000000000..df0bb72a5
--- /dev/null
+++ b/src/System.ValueTuple/src/System.ValueTuple.csproj
@@ -0,0 +1,58 @@
+
+
+
+
+
+ {4C2655DB-BD9E-4C86-83A6-744ECDDBDF29}
+ $(OutputPath)$(MSBuildProjectName).xml
+ true
+ false
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ System
+
+
+
+
+
+
+ Common\System\Numerics\Hashing\HashHelpers.cs
+
+
+
+
+
+
+
+
+ Common\System\Reflection\AssemblyMetadataAttribute.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/System.ValueTuple/src/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs b/src/System.ValueTuple/src/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
new file mode 100644
index 000000000..25ee7280c
--- /dev/null
+++ b/src/System.ValueTuple/src/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
@@ -0,0 +1,57 @@
+// 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.Collections.Generic;
+
+namespace System.Runtime.CompilerServices
+{
+ ///
+ /// Indicates that the use of on a member is meant to be treated as a tuple with element names.
+ ///
+ [CLSCompliant(false)]
+ [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Event )]
+ public sealed class TupleElementNamesAttribute : Attribute
+ {
+ private readonly string[] _transformNames;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Specifies, in a pre-order depth-first traversal of a type's
+ /// construction, which occurrences are
+ /// meant to carry element names.
+ ///
+ ///
+ /// This constructor is meant to be used on types that contain an
+ /// instantiation of that contains
+ /// element names. For instance, if C is a generic type with
+ /// two type parameters, then a use of the constructed type C{, might be intended to
+ /// treat the first type argument as a tuple with element names and the
+ /// second as a tuple without element names. In which case, the
+ /// appropriate attribute specification should use a
+ /// transformNames value of { "name1", "name2", null, null,
+ /// null }.
+ ///
+ public TupleElementNamesAttribute(string[] transformNames)
+ {
+ if (transformNames == null)
+ {
+ throw new ArgumentNullException(nameof(transformNames));
+ }
+
+ _transformNames = transformNames;
+ }
+
+ ///
+ /// Specifies, in a pre-order depth-first traversal of a type's
+ /// construction, which elements are
+ /// meant to carry element names.
+ ///
+ public IList TransformNames => _transformNames;
+ }
+}
diff --git a/src/System.ValueTuple/src/System/ValueTuple/TupleExtensions.cs b/src/System.ValueTuple/src/System/ValueTuple/TupleExtensions.cs
new file mode 100644
index 000000000..096df9571
--- /dev/null
+++ b/src/System.ValueTuple/src/System/ValueTuple/TupleExtensions.cs
@@ -0,0 +1,929 @@
+// 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.ComponentModel;
+
+namespace System
+{
+ ///
+ /// Provides extension methods for instances to interop with C# tuples features (deconstruction syntax, converting from and to ).
+ ///
+ public static class TupleExtensions
+ {
+ #region Deconstruct
+ ///
+ /// Deconstruct a properly nested with 1 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1)
+ {
+ item1 = value.Item1;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 2 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 3 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 4 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 5 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 6 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ item6 = value.Item6;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 7 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ item6 = value.Item6;
+ item7 = value.Item7;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 8 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ item6 = value.Item6;
+ item7 = value.Item7;
+ item8 = value.Rest.Item1;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 9 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ item6 = value.Item6;
+ item7 = value.Item7;
+ item8 = value.Rest.Item1;
+ item9 = value.Rest.Item2;
+ }
+
+ ///
+ /// Deconstruct a properly nested with 10 elements.
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static void Deconstruct(
+ this Tuple> value,
+ out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10)
+ {
+ item1 = value.Item1;
+ item2 = value.Item2;
+ item3 = value.Item3;
+ item4 = value.Item4;
+ item5 = value.Item5;
+ item6 = value.Item6;
+ item7 = value.Item7;
+ item8 = value.Rest.Item1;
+ item9 = value.Rest.Item2;
+ item10 = value.Rest.Item3;
+ }
+
+ ///