public InstallCommand(ISteamSessionFactory factory, ISteamDownloader steamDownloader, ISteamApi steamApi) : base(factory) { _steamDownloader = steamDownloader; _steamApi = steamApi; IsCommand("install", "Install desired Steam PublishedFile(s) for the specified appid"); HasFlag("f|force", "Force resubscription", f => Force = f); AllowsAnyAdditionalArguments("<publishedfileid> [<publishedfileid2> ...]"); }
public async Task Download(ISteamDownloader steamDownloader, ISteamApi steamApi, PublishedFile pf, Action <long?, double> action, CancellationToken cancelToken = default(CancellationToken), bool force = false) { if (force) { await HandleWorkshopItemMetadataRemoval(pf, cancelToken).ConfigureAwait(false); } await pf.Download(steamDownloader, steamApi, action, cancelToken, force).ConfigureAwait(false); }
public async Task Download(ISteamDownloader dl, ISteamApi api, Action<long?, double> progressAction = null, CancellationToken cancelToken = default(CancellationToken), bool force = false) { if (!force && !RequiresDownloading()) { progressAction?.Invoke(null, 100); return; } await HandleSubscription(force, api).ConfigureAwait(false); await dl.Download(this, progressAction, cancelToken).ConfigureAwait(false); }
public async Task Download(ISteamDownloader dl, ISteamApi api, Action <long?, double> progressAction = null, CancellationToken cancelToken = default(CancellationToken), bool force = false) { if (!force && !RequiresDownloading()) { progressAction?.Invoke(null, 100); return; } await HandleSubscription(force, api).ConfigureAwait(false); await dl.Download(this, progressAction, cancelToken).ConfigureAwait(false); }
public async Task Download(ISteamDownloader steamDownloader, ISteamApi steamApi, PublishedFile pf, Action<long?, double> action, CancellationToken cancelToken = default(CancellationToken), bool force = false) { if (force) await HandleWorkshopItemMetadataRemoval(pf, cancelToken).ConfigureAwait(false); await pf.Download(steamDownloader, steamApi, action, cancelToken, force).ConfigureAwait(false); }