2using System.Collections.Frozen;
5using System.Threading.Tasks;
32 public Task
CleanCache(CancellationToken cancellationToken)
33 => Task.WhenAll(
delegatedInstallers.Values.Select(installer => installer.CleanCache(cancellationToken)));
37 => DelegateCall(version, installer => installer.CreateInstallation(version, path, installationTask));
41 => DelegateCall(version, installer => installer.DownloadVersion(version, jobProgressReporter, cancellationToken));
44 public ValueTask
Install(
EngineVersion version,
string path,
bool deploymentPipelineProcesses, CancellationToken cancellationToken)
45 => DelegateCall(version, installer => installer.Install(version, path, deploymentPipelineProcesses, cancellationToken));
49 => DelegateCall(version, installer => installer.TrustDmbPath(version, fullDmbPath, cancellationToken));
53 => DelegateCall(version, installer => installer.UpgradeInstallation(version, path, cancellationToken));
64 ArgumentNullException.ThrowIfNull(version);
Information about an engine installation.
EngineType? Engine
The EngineType.
Implementation of IEngineInstaller that forwards calls to different IEngineInstaller based on their a...
IEngineInstallation CreateInstallation(EngineVersion version, string path, Task installationTask)
Creates an IEngineInstallation for a given version .The IEngineInstallation.
DelegatingEngineInstaller(FrozenDictionary< EngineType, IEngineInstaller > delegatedInstallers)
Initializes a new instance of the DelegatingEngineInstaller class.
TReturn DelegateCall< TReturn >(EngineVersion version, Func< IEngineInstaller, TReturn > call)
Delegate a given call to its appropriate IEngineInstaller.
ValueTask Install(EngineVersion version, string path, bool deploymentPipelineProcesses, CancellationToken cancellationToken)
Does actions necessary to get an extracted installation working.A ValueTask representing the running ...
ValueTask< IEngineInstallationData > DownloadVersion(EngineVersion version, JobProgressReporter jobProgressReporter, CancellationToken cancellationToken)
Download a given engine version .A ValueTask<TResult> resulting in the IEngineInstallationData for th...
ValueTask UpgradeInstallation(EngineVersion version, string path, CancellationToken cancellationToken)
Does actions necessary to get upgrade a version installed by a previous version of TGS....
Task CleanCache(CancellationToken cancellationToken)
Attempts to cleans the engine's cache folder for the system.A Task representing the running operation...
readonly FrozenDictionary< EngineType, IEngineInstaller > delegatedInstallers
The FrozenDictionary<TKey, TValue> mapping EngineTypes to their appropriate IEngineInstaller.
ValueTask TrustDmbPath(EngineVersion version, string fullDmbPath, CancellationToken cancellationToken)
Add a given fullDmbPath to the trusted DMBs list in BYOND's config.A ValueTask representing the runn...
Progress reporter for a Job.
Represents a BYOND installation.
For downloading and installing game engines for a given system.