From 4db812ca7e6c4d4f8a43e6a40adeb8c111f0ddc0 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Mon, 2 Sep 2013 17:31:33 +0200 Subject: [PATCH] Add missing .NET 4.5 APIs * System.Text.RegularExpressions.Regex.InfiniteMatchTimeout * System.Net.HttpStatusCode.UpgradeRequired * Add System.Reflection.TypeAttributes.WindowsRuntime * System.Runtime.GCLatencyMode.SustainedLowLatency * System.UriComponents.NormalizedHost --- mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs | 3 +++ mcs/class/System/System.Net/HttpStatusCode.cs | 3 +++ mcs/class/System/System.Text.RegularExpressions/Regex.cs | 2 ++ mcs/class/System/System/UriComponents.cs | 3 +++ mcs/class/corlib/System.Reflection/TypeAttributes.cs | 4 ++++ mcs/class/corlib/System.Runtime/GCLatencyMode.cs | 5 ++++- 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs index 223faff637c..ab3c54ef1be 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs @@ -120,6 +120,9 @@ namespace System.ServiceModel public NetTcpSecurity Security { get { return security; } +#if NET_4_0 + set { security = value; } +#endif } public EnvelopeVersion EnvelopeVersion { diff --git a/mcs/class/System/System.Net/HttpStatusCode.cs b/mcs/class/System/System.Net/HttpStatusCode.cs index f6b72e03253..fcc3e26d701 100644 --- a/mcs/class/System/System.Net/HttpStatusCode.cs +++ b/mcs/class/System/System.Net/HttpStatusCode.cs @@ -73,6 +73,9 @@ namespace System.Net { UnsupportedMediaType = 415, RequestedRangeNotSatisfiable = 416, ExpectationFailed = 417, +#if NET_4_5 + UpgradeRequired = 426, +#endif InternalServerError = 500, NotImplemented = 501, BadGateway = 502, diff --git a/mcs/class/System/System.Text.RegularExpressions/Regex.cs b/mcs/class/System/System.Text.RegularExpressions/Regex.cs index f8c7de81348..9307a632bce 100644 --- a/mcs/class/System/System.Text.RegularExpressions/Regex.cs +++ b/mcs/class/System/System.Text.RegularExpressions/Regex.cs @@ -272,6 +272,8 @@ namespace System.Text.RegularExpressions { { return Split (input, pattern, options); } + + public static readonly TimeSpan InfiniteMatchTimeout = TimeSpan.FromMilliseconds (-1); #endif static void validate_options (RegexOptions options) diff --git a/mcs/class/System/System/UriComponents.cs b/mcs/class/System/System/UriComponents.cs index 03a8553dba6..b20e6dcab2e 100644 --- a/mcs/class/System/System/UriComponents.cs +++ b/mcs/class/System/System/UriComponents.cs @@ -39,6 +39,9 @@ namespace System { Query = 32, Fragment = 64, StrongPort = 128, +#if NET_4_5 + NormalizedHost = 256, +#endif KeepDelimiter = 0x40000000, HostAndPort = Host | StrongPort, diff --git a/mcs/class/corlib/System.Reflection/TypeAttributes.cs b/mcs/class/corlib/System.Reflection/TypeAttributes.cs index cc73f9504d6..f08c7c8173f 100644 --- a/mcs/class/corlib/System.Reflection/TypeAttributes.cs +++ b/mcs/class/corlib/System.Reflection/TypeAttributes.cs @@ -128,6 +128,10 @@ namespace System.Reflection { /// Serializable = 8192, +#if NET_4_5 + WindowsRuntime = 16384, +#endif + /// /// StringFormatMask = 196608, diff --git a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs index 695d3e562f1..8274d34596a 100644 --- a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs +++ b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs @@ -34,6 +34,9 @@ namespace System.Runtime { Batch = 0, Interactive = 1, - LowLatency = 2 + LowLatency = 2, +#if NET_4_5 + SustainedLowLatency = 3 +#endif } } -- 2.11.4.GIT