Class PlatformUtils
Inherited Members
Namespace: GitCredentialManager
Assembly: Algenta.Colectica.Repository.Client.dll
Syntax
public static class PlatformUtils
Methods
EnsureLinux()
Ensure the current Operating System is Linux-based, fail otherwise.
Declaration
public static void EnsureLinux()
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Thrown if the current OS is not Linux-based. |
EnsureMacOS()
Ensure the current Operating System is macOS, fail otherwise.
Declaration
public static void EnsureMacOS()
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Thrown if the current OS is not macOS. |
EnsurePosix()
Ensure the current Operating System is POSIX-compliant, fail otherwise.
Declaration
public static void EnsurePosix()
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Thrown if the current OS is not POSIX-compliant. |
EnsureWindows()
Ensure the current Operating System is Windows, fail otherwise.
Declaration
public static void EnsureWindows()
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Thrown if the current OS is not Windows. |
GetPlatformInformation()
Get information about the current platform (OS and CLR details).
Declaration
public static PlatformInformation GetPlatformInformation()
Returns
Type | Description |
---|---|
PlatformInformation | Platform information. |
IsElevatedUser()
Declaration
public static bool IsElevatedUser()
Returns
Type | Description |
---|---|
bool |
IsLinux()
Check if the current Operating System is Linux-based.
Declaration
public static bool IsLinux()
Returns
Type | Description |
---|---|
bool | True if running on a Linux distribution, false otherwise. |
IsMacOS()
Check if the current Operating System is macOS.
Declaration
public static bool IsMacOS()
Returns
Type | Description |
---|---|
bool | True if running on macOS, false otherwise. |
IsPosix()
Check if the current Operating System is POSIX-compliant.
Declaration
public static bool IsPosix()
Returns
Type | Description |
---|---|
bool | True if running on a POSIX-compliant Operating System, false otherwise. |
IsWindows()
Check if the current Operating System is Windows.
Declaration
public static bool IsWindows()
Returns
Type | Description |
---|---|
bool | True if running on Windows, false otherwise. |
IsWindowsBrokerSupported()
Declaration
public static bool IsWindowsBrokerSupported()
Returns
Type | Description |
---|---|
bool |