You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ public static bool IsOSPlatformVersionAtLeast(string platform, int major, int mi
120
120
/// <summary>
121
121
/// Indicates whether the current application is running as WASM in a Browser.
122
122
/// </summary>
123
+
[NonVersionable]
123
124
publicstaticboolIsBrowser()=>
124
125
#if TARGET_BROWSER
125
126
true;
@@ -130,6 +131,7 @@ public static bool IsBrowser() =>
130
131
/// <summary>
131
132
/// Indicates whether the current application is running on Linux.
132
133
/// </summary>
134
+
[NonVersionable]
133
135
publicstaticboolIsLinux()=>
134
136
#if TARGET_LINUX&&!TARGET_ANDROID
135
137
true;
@@ -140,6 +142,7 @@ public static bool IsLinux() =>
140
142
/// <summary>
141
143
/// Indicates whether the current application is running on FreeBSD.
142
144
/// </summary>
145
+
[NonVersionable]
143
146
publicstaticboolIsFreeBSD()=>
144
147
#if TARGET_FREEBSD
145
148
true;
@@ -156,6 +159,7 @@ public static bool IsFreeBSDVersionAtLeast(int major, int minor = 0, int build =
156
159
/// <summary>
157
160
/// Indicates whether the current application is running on Android.
158
161
/// </summary>
162
+
[NonVersionable]
159
163
publicstaticboolIsAndroid()=>
160
164
#if TARGET_ANDROID
161
165
true;
@@ -173,6 +177,7 @@ public static bool IsAndroidVersionAtLeast(int major, int minor = 0, int build =
173
177
/// Indicates whether the current application is running on iOS or MacCatalyst.
174
178
/// </summary>
175
179
[SupportedOSPlatformGuard("maccatalyst")]
180
+
[NonVersionable]
176
181
publicstaticboolIsIOS()=>
177
182
#if TARGET_IOS||TARGET_MACCATALYST
178
183
true;
@@ -184,12 +189,14 @@ public static bool IsIOS() =>
184
189
/// Check for the iOS/MacCatalyst version (returned by 'libobjc.get_operatingSystemVersion') with a >= version comparison. Used to guard APIs that were added in the given iOS release.
0 commit comments