From: Marek Safar Date: Fri, 10 Jul 2020 22:06:56 +0000 (+0200) Subject: Update Environment.OSVersion for browser platform (#38790) X-Git-Tag: submit/tizen/20210909.063632~6781 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26cb16619dd72d3c4a44c0d41a5fda9e1ff50e56;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Update Environment.OSVersion for browser platform (#38790) * Update Environment.OSVersion for browser platform * Reflect api review --- diff --git a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems index a5422ab..983a30c 100644 --- a/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems +++ b/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems @@ -1792,7 +1792,7 @@ - + @@ -1818,6 +1818,9 @@ + + + Common\Interop\OSX\Interop.libobjc.cs diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.OSVersion.Browser.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.OSVersion.Browser.cs new file mode 100644 index 0000000..9dd80cb --- /dev/null +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.OSVersion.Browser.cs @@ -0,0 +1,14 @@ +// 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 +{ + public static partial class Environment + { + private static OperatingSystem GetOSVersion() + { + return new OperatingSystem(PlatformID.Other, new Version(1, 0, 0, 0)); + } + } +} diff --git a/src/libraries/System.Private.CoreLib/src/System/PlatformID.cs b/src/libraries/System.Private.CoreLib/src/System/PlatformID.cs index 31e9210..475cdc4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/PlatformID.cs +++ b/src/libraries/System.Private.CoreLib/src/System/PlatformID.cs @@ -13,6 +13,7 @@ namespace System [EditorBrowsable(EditorBrowsableState.Never)] WinCE = 3, Unix = 4, [EditorBrowsable(EditorBrowsableState.Never)] Xbox = 5, - [EditorBrowsable(EditorBrowsableState.Never)] MacOSX = 6 + [EditorBrowsable(EditorBrowsableState.Never)] MacOSX = 6, + Other = 7 } } diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 388eeea..0baf640 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -3077,6 +3077,7 @@ namespace System Xbox = 5, [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] MacOSX = 6, + Other = 7, } public partial class PlatformNotSupportedException : System.NotSupportedException {