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
| Constructor | Summary |
|---|---|
RuntimeInfo | Creates a new instance with the specified properties |
RuntimeInfo | Creates 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
| Name | Type | Description |
|---|---|---|
id | string | |
displayName | string |
Properties
| Property | Summary |
|---|---|
Id | The unique Id of this runtime. Can be used to retrieve a runtime instance with GetRuntimeByName(string) |
DisplayName | The 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
| Method | Summary |
|---|---|
GetDownloadUrl | Retrieves the web url to the latest compatible runtime installer exe |
CheckIsInstalled | Check if a runtime compatible with the current instance is installed on this system |
CheckIsSupported | Check if this runtime is supported on the current system |
DownloadToFile | Download the latest installer for this runtime to the specified file |
InvokeInstaller | Execute a runtime installer at a local file path. Typically used after DownloadToFile |
ToString | The unique string representation of this runtime |
GetHashCode | The 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
| Name | Type | Description |
|---|---|---|
localPath | string | |
progress | Action<int> | |
downloader | IFileDownloader | |
log | IVelopackLogger |
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
| Name | Type | Description |
|---|---|---|
pathToInstaller | string | |
isQuiet | bool | |
log | IVelopackLogger |
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