示例#1
0
 protected override async Task InstallImpl(IContentInstallationService installationService,
     IDownloadContentAction<IInstallableContent> action) {
     await base.InstallImpl(installationService, action).ConfigureAwait(false);
     // TODO
     //await new GtaPackager(InstalledState.Directory).HandlePackages().ConfigureAwait(false);
     HandleBackups();
 }
示例#2
0
        protected override async Task InstallImpl(IContentInstallationService installationService,
                                                  IDownloadContentAction <IInstallableContent> action)
        {
            await base.InstallImpl(installationService, action).ConfigureAwait(false);

            // TODO
            //await new GtaPackager(InstalledState.Directory).HandlePackages().ConfigureAwait(false);
            HandleBackups();
        }
示例#3
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 {
     foreach (var m in GetPackagedContent(action.Content).Select(x => new RvMod(this, x)))
     {
         m.Register();
     }
     return(base.InstallImpl(installationService, action));
 }
示例#4
0
 protected virtual InstallContentAction GetInstallAction(
     IDownloadContentAction <IInstallableContent> action)
 => new InstallContentAction(action.Content, action.CancelToken)
 {
     RemoteInfo       = RemoteInfo,
     Paths            = ContentPaths,
     Game             = this,
     Cleaning         = ContentCleaning,
     Force            = action.Force,
     HideLaunchAction = action.HideLaunchAction,
     Name             = action.Name
 };
示例#5
0
 protected override InstallContentAction GetInstallAction(
         IDownloadContentAction<IInstallableContent> action)
     => new InstallContentAction(action.Content, action.CancelToken) {
         RemoteInfo = RemoteInfo,
         Paths = ContentPaths,
         Game = this,
         CheckoutType = CheckoutType.CheckoutWithoutRemoval,
         GlobalWorkingPath = InstalledState.Directory,
         Cleaning = ContentCleaning,
         Force = action.Force,
         HideLaunchAction = action.HideLaunchAction,
         Name = action.Name
     };
示例#6
0
 protected override InstallContentAction GetInstallAction(
     IDownloadContentAction<IInstallableContent> action) {
     var content = action.Content;
     return new InstallContentAction(HandleAia(content), action.CancelToken) {
         RemoteInfo = RemoteInfo,
         Paths = ContentPaths,
         Game = this,
         Cleaning = ContentCleaning,
         Force = action.Force,
         HideLaunchAction = action.HideLaunchAction,
         Name = action.Name
     };
 }
示例#7
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 {
     foreach (var m in GetPackagedContent(action.Content).OfType <ModNetworkContent>())
     {
         m.RegisterAdditionalPostInstallTask(async processed => {
             if (processed)
             {
                 await InstallMod(m).ConfigureAwait(false);
             }
         });
     }
     return(base.InstallImpl(installationService, action));
 }
示例#8
0
 protected override InstallContentAction GetInstallAction(
     IDownloadContentAction <IInstallableContent> action)
 => new InstallContentAction(action.Content, action.CancelToken)
 {
     RemoteInfo        = RemoteInfo,
     Paths             = ContentPaths,
     Game              = this,
     CheckoutType      = CheckoutType.CheckoutWithoutRemoval,
     GlobalWorkingPath = InstalledState.Directory,
     Cleaning          = ContentCleaning,
     Force             = action.Force,
     HideLaunchAction  = action.HideLaunchAction,
     Name              = action.Name
 };
示例#9
0
        protected override InstallContentAction GetInstallAction(
            IDownloadContentAction <IInstallableContent> action)
        {
            var content = action.Content;

            return(new InstallContentAction(HandleAia(content), action.CancelToken)
            {
                RemoteInfo = RemoteInfo,
                Paths = ContentPaths,
                Game = this,
                Cleaning = ContentCleaning,
                Force = action.Force,
                HideLaunchAction = action.HideLaunchAction,
                Name = action.Name
            });
        }
示例#10
0
 protected abstract Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action);
示例#11
0
 Task InstallInternal(IContentInstallationService contentInstallation,
                      IDownloadContentAction <IInstallableContent> installAction)
 {
     ConfirmInstall();
     return(InstallImpl(contentInstallation, installAction));
 }
示例#12
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 => installationService.Install(GetInstallAction(action));