Class Platform
Platform-specific methods.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Platform : 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 |
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 |
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
GetSystemProperty(String)
Gets the system property.
Declaration
public static string GetSystemProperty(string property)
Parameters
Type | Name | Description |
---|---|---|
System.String | property | Property to get. |
Returns
Type | Description |
---|---|
System.String | The system property value. |