Interface IGameInstaller
Installs files to an IGame by yielding TaskResult<T>.
Inherited Members
Namespace: Snowflake.Installation.Extensibility
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IGameInstaller : IPlugin, IDisposable
Properties
SupportedPlatforms
Platforms this IGame
Declaration
IEnumerable<PlatformId> SupportedPlatforms { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
GetInstallables(PlatformId, IEnumerable<FileSystemInfo>)
Queries all installable file system entries in a given parent directory.
This method should not perform any file write operations.
Declaration
IEnumerable<IInstallable> GetInstallables(PlatformId platformId, IEnumerable<FileSystemInfo> fileEntries)
Parameters
Type | Name | Description |
---|---|---|
Platform |
platformId | The platform to lookup installables for. |
System. |
fileEntries | A list of file system entries to search. Typically this may be a list of file entries in a directory. |
Returns
Type | Description |
---|---|
System. |
A list of installables that can be used with Install(IGame, IEnumerable<FileSystemInfo>, CancellationToken) |
Install(IGame, IEnumerable<FileSystemInfo>, CancellationToken)
Installs files to an IGame by yielding instances of TaskResult<T>. Instead of doing manual file manipulation, use installation tasks. AsyncInstallTask<T> and AsyncInstallTaskEnumerable<T>.
This method is not allowed to throw. Exceptions may only occur within AsyncInstallTask<T> and AsyncInstallTaskEnumerable<T> awaited by this System.Collections.Generic.IAsyncEnumerable<T> to yield TaskResult<T> instances.
Declaration
IAsyncEnumerable<TaskResult<IFile>> Install(IGame game, IEnumerable<FileSystemInfo> files, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IGame | game | The game to install the files to. |
System. |
files | The list of files to install. Use GetInstallables(PlatformId, IEnumerable<FileSystemInfo>) to ensure that this installer can properly install the given files. |
System. |
cancellationToken | The cancellation token to pass to the installer. |
Returns
Type | Description |
---|---|
System. |
The files that were installed to the game. |