Saltar al contenido principal

Runtimes.RuntimeInfo class

Namespace: Velopack.Windows

Base type containing information about a runtime in relation to the current operating system

public abstract class Runtimes.RuntimeInfo

Constructors

ConstructorSummary
RuntimeInfoCreates a new instance with the specified properties
RuntimeInfoCreates a new instance with the specified properties

RuntimeInfo()

protected RuntimeInfo()

Creates a new instance with the specified properties

RuntimeInfo(id, displayName)

protected RuntimeInfo(string id, string displayName)

Creates a new instance with the specified properties

Parameters

NameTypeDescription
idstring
displayNamestring

Properties

PropertySummary
IdThe unique Id of this runtime. Can be used to retrieve a runtime instance with GetRuntimeByName(string)
DisplayNameThe human-friendly name of this runtime - for displaying to users

Id

public virtual string Id { get; }

The unique Id of this runtime. Can be used to retrieve a runtime instance with GetRuntimeByName(string)

DisplayName

public virtual string DisplayName { get; }

The human-friendly name of this runtime - for displaying to users

Methods

MethodSummary
GetDownloadUrlRetrieves the web url to the latest compatible runtime installer exe
CheckIsInstalledCheck if a runtime compatible with the current instance is installed on this system
CheckIsSupportedCheck if this runtime is supported on the current system
DownloadToFileDownload the latest installer for this runtime to the specified file
InvokeInstallerExecute a runtime installer at a local file path. Typically used after DownloadToFile
ToStringThe unique string representation of this runtime
GetHashCodeThe unique hash code of this runtime

GetDownloadUrl()

public abstract Task<string> GetDownloadUrl()

Retrieves the web url to the latest compatible runtime installer exe

Returns Task<string>

CheckIsInstalled()

public abstract Task<bool> CheckIsInstalled()

Check if a runtime compatible with the current instance is installed on this system

Returns Task<bool>

CheckIsSupported()

public abstract Task<bool> CheckIsSupported()

Check if this runtime is supported on the current system

Returns Task<bool>

DownloadToFile(localPath, progress, downloader, log)

public virtual Task DownloadToFile(string localPath, Action<int> progress = null, IFileDownloader downloader = null, IVelopackLogger log = null)

Download the latest installer for this runtime to the specified file

Parameters

NameTypeDescription
localPathstring
progressAction<int>
downloaderIFileDownloader
logIVelopackLogger

Returns Task

InvokeInstaller(pathToInstaller, isQuiet, log)

public virtual Task<Runtimes.RuntimeInstallResult> InvokeInstaller(string pathToInstaller, bool isQuiet, IVelopackLogger log = null)

Execute a runtime installer at a local file path. Typically used after DownloadToFile

Parameters

NameTypeDescription
pathToInstallerstring
isQuietbool
logIVelopackLogger

Returns Task<Runtimes.RuntimeInstallResult>

ToString()

public override string ToString()

The unique string representation of this runtime

Returns string

GetHashCode()

public override int GetHashCode()

The unique hash code of this runtime

Returns int


Generated from Velopack 1.1.1