Class PlatformUtils
Provides information to identify the current platform.
public static class PlatformUtils
- Inheritance
-
PlatformUtils
- Inherited Members
Fields
IsAppleSilicon
Indicates whether the current application is running on Apple Silicon SoC.
public static readonly bool IsAppleSilicon
Field Value
IsLinux
Indicates whether the current application is running on Linux.
public static readonly bool IsLinux
Field Value
IsMacOs
Indicates whether the current application is running on macOS.
public static readonly bool IsMacOs
Field Value
IsMono
Indicates whether the current application is running on the Mono .NET Runtime.
public static readonly bool IsMono
Field Value
IsWindows
Indicates whether the current application is running on Windows.
public static readonly bool IsWindows
Field Value
LogicalCoreCount
Gets the number of logical processors on the machine. If the process is running with CPU affinity, returns the number of processors that the process is affinitized to. If the process is running with a CPU utilization limit, returns the CPU utilization limit rounded up to the next whole number.
public static readonly int LogicalCoreCount
Field Value
OsArch
Gets the platform architecture on which the current app is running. The returned value is intended to represent the actual architecture of the underlying operating system. It is a best effort to ignore the architecture emulation infrastructure that may be involved to run the process. The returned value takes into account emulation built into Windows and macOS operating systems. The returned value does not take into account emulation using QEMU that is typically used on Linux operating system.
public static readonly Architecture OsArch
Field Value
OsNameAndVersion
Gets the OS name and version.
public static readonly string OsNameAndVersion
Field Value
PlatformDiagInfo
Gets a string containing the OS name and version, architecture and number of logical cores. Used for debugging and logging purposes.
public static readonly string PlatformDiagInfo