Skip to content

Commit 3b4c5a5

Browse files
authored
Add OSPlatform.Browser and Architecture.Wasm (#34781)
1 parent 4b85b6d commit 3b4c5a5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ public enum Architecture
1313
X64 = 1,
1414
Arm = 2,
1515
Arm64 = 3,
16+
Wasm = 4,
1617
}
1718
public readonly partial struct OSPlatform : System.IEquatable<System.Runtime.InteropServices.OSPlatform>
1819
{
1920
private readonly object _dummy;
2021
private readonly int _dummyPrimitive;
22+
public static System.Runtime.InteropServices.OSPlatform Browser { get { throw null; } }
2123
public static System.Runtime.InteropServices.OSPlatform FreeBSD { get { throw null; } }
2224
public static System.Runtime.InteropServices.OSPlatform Linux { get { throw null; } }
2325
public static System.Runtime.InteropServices.OSPlatform OSX { get { throw null; } }

src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/Architecture.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public enum Architecture
99
X86,
1010
X64,
1111
Arm,
12-
Arm64
12+
Arm64,
13+
Wasm
1314
}
1415
}

src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/OSPlatform.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ namespace System.Runtime.InteropServices
88
{
99
private readonly string _osPlatform;
1010

11+
public static OSPlatform Browser { get; } = new OSPlatform("BROWSER");
12+
1113
public static OSPlatform FreeBSD { get; } = new OSPlatform("FREEBSD");
1214

1315
public static OSPlatform Linux { get; } = new OSPlatform("LINUX");

0 commit comments

Comments
 (0)