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> ...]");
        }
示例#2
0
 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);
 }
示例#3
0
        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 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);
        }
示例#5
0
        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);
        }
示例#6
0
 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);
 }