Saltar al contenido principal

VelopackRuntimeInfo class

Namespace: Velopack

Convenience class which provides runtime information about the current executing process, in a way that is safe in older and newer versions of the framework.

public static class VelopackRuntimeInfo

Properties

PropertySummary
VelopackDisplayVersionThe current compiled Velopack display version.
VelopackNugetVersionThe current compiled Velopack NuGetVersion.
VelopackProductVersionThe current compiled Velopack ProductVersion.
SystemArchThe current machine architecture, ignoring the current process / pe architecture.
SystemOsThe name of the current OS - eg. 'windows', 'linux', or 'osx'.
SystemRidThe current system RID.
IsWindowsTrue if executing on a Windows platform.
IsLinuxTrue if executing on a Linux platform.
IsOSXTrue if executing on a MacOS / OSX platform.

VelopackDisplayVersion

public static string VelopackDisplayVersion { get; }

The current compiled Velopack display version.

VelopackNugetVersion

public static SemanticVersion VelopackNugetVersion { get; }

The current compiled Velopack NuGetVersion.

VelopackProductVersion

public static SemanticVersion VelopackProductVersion { get; }

The current compiled Velopack ProductVersion.

SystemArch

public static RuntimeCpu SystemArch { get; }

The current machine architecture, ignoring the current process / pe architecture.

SystemOs

public static RuntimeOs SystemOs { get; }

The name of the current OS - eg. 'windows', 'linux', or 'osx'.

SystemRid

public static string SystemRid { get; }

The current system RID.

IsWindows

public static bool IsWindows { get; }

True if executing on a Windows platform.

IsLinux

public static bool IsLinux { get; }

True if executing on a Linux platform.

IsOSX

public static bool IsOSX { get; }

True if executing on a MacOS / OSX platform.

Methods

MethodSummary
GetOsShortNameReturns the shortened OS name as a string, suitable for creating an RID.
GetOsLongNameReturns the long OS name, suitable for showing to a human.

GetOsShortName(os)

public static string GetOsShortName(this RuntimeOs os)

Returns the shortened OS name as a string, suitable for creating an RID.

Parameters

NameTypeDescription
osRuntimeOs

Returns string

GetOsLongName(os)

public static string GetOsLongName(this RuntimeOs os)

Returns the long OS name, suitable for showing to a human.

Parameters

NameTypeDescription
osRuntimeOs

Returns string


Generated from Velopack 1.1.1