コード例 #1
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> ...]");
        }
コード例 #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> ...]");
        }
コード例 #4
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);
        }
コード例 #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
ファイル: App.cs プロジェクト: SIXNetworks/withSIX.Desktop
 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);
 }