Class Platform
Platform-specific methods.
Inheritance
Implements
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Platform : object, IPlatform
Constructors
Platform()
Initializes a new instance of the Platform class.
Declaration
public Platform()
Properties
Architecture
Gets the current CPU architecture.
Declaration
public Architecture Architecture { get; }
Property Value
| Type | Description |
|---|---|
| Architecture |
CoreCount
Gets the current CPU core count.
Declaration
public int CoreCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
CryptoLibrary
Gets or sets the cryptography library to use.
Declaration
public CryptoLibrary CryptoLibrary { get; set; }
Property Value
| Type | Description |
|---|---|
| CryptoLibrary |
DirectorySeparator
Gets the character used to separate directories.
Declaration
public string DirectorySeparator { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Instance
Gets the instance.
Declaration
public static IPlatform Instance { get; }
Property Value
| Type | Description |
|---|---|
| IPlatform |
IsLittleEndian
Gets a value indicating whether this is little-endian platform.
Declaration
public bool IsLittleEndian { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsMobile
Gets or sets a value indicating whether this is a mobile platform.
Declaration
public bool IsMobile { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MachineName
Gets the current machine name.
Declaration
public string MachineName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
OperatingSystem
Gets the current operating system.
Declaration
public OperatingSystem OperatingSystem { get; }
Property Value
| Type | Description |
|---|---|
| OperatingSystem |
OperatingSystemVersion
Gets the current operating system version.
Declaration
public string OperatingSystemVersion { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
PhysicalMemory
Gets the current physical memory in bytes.
Declaration
public long PhysicalMemory { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
PlatformTypeVersion
Gets the version of the PlatformType
Declaration
public string PlatformTypeVersion { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ProcessId
Gets the id of the current process.
Declaration
public int ProcessId { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
SourceLanguage
Gets the current programming language for the source code.
Declaration
public SourceLanguage SourceLanguage { get; }
Property Value
| Type | Description |
|---|---|
| SourceLanguage |
Type
Gets the current PlatformType.
Declaration
public PlatformType Type { get; }
Property Value
| Type | Description |
|---|---|
| PlatformType |
UseFipsAlgorithms
Gets or sets a value that indicates whether FIPS algorithms should be used. Note that not all platforms or third-party libraries are FIPS-compliant, so this should not be used as a guarantee of FIPS compliance.
Declaration
public bool UseFipsAlgorithms { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
ToString(Boolean)
Gets the string representation of the PlatformType and Platform type version, if isVerbose is true then the OS and OS version are included.
Declaration
public string ToString(bool isVerbose)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isVerbose |
Returns
| Type | Description |
|---|---|
| System.String |