public async Task Uninstall(IContentInstallationService contentInstallation, IContentAction <IUninstallableContent> uninstallLocalContentAction) { await UninstallInternal(contentInstallation, uninstallLocalContentAction).ConfigureAwait(false); PrepareEvent(new UninstallActionCompleted(uninstallLocalContentAction, this)); }
public PerformUpdateHandler(IStateHandler stateHandler, IContentInstallationService contentInstallation, IUpdateHandler updateHandler) { _stateHandler = stateHandler; _contentInstallation = contentInstallation; _updateHandler = updateHandler; }
public async Task Install(IContentInstallationService installationService, DownloadContentAction installAction) { await InstallInternal(installationService, installAction).ConfigureAwait(false); PrepareEvent(new InstallActionCompleted(installAction, this)); }
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(); }
async Task <int> PlayInternal(IGameLauncherFactory factory, IContentInstallationService contentInstallation, IPlayContentAction <IContent> action) { ConfirmPlay(); await InstallInternal(contentInstallation, action.ToInstall()).ConfigureAwait(false); return(await LaunchInternal(factory, action).ConfigureAwait(false)); }
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)); }
public AddExternalModHandler(IDbContextLocator dbContextLocator, IContentInstallationService contentInstallation, IExternalFileDownloader fd, IExternalDownloadStateHandler state) : base(dbContextLocator) { _contentInstallation = contentInstallation; _fd = fd; _state = state; }
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(); }
async Task UninstallInternal(IContentInstallationService contentInstallation, IContentAction <IUninstallableContent> uninstallContentAction) { //ConfirmUninstall() await UninstallImpl(contentInstallation, uninstallContentAction).ConfigureAwait(false); foreach (var c in uninstallContentAction.Content.Select(x => x.Content).OfType <Content>()) { Contents.Remove(c); } }
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)); }
protected override Task UninstallImpl(IContentInstallationService installationService, IContentAction <IUninstallableContent> action) { foreach (var m in action.Content.OfType <ModNetworkContent>()) { m.RegisterAdditionalPreUninstallTask(async processed => { if (processed) { await UninstallMod(m).ConfigureAwait(false); } }); } return(base.UninstallImpl(installationService, action)); }
public InstallContentHandler(IDbContextLocator dbContextLocator, IContentInstallationService contentInstallation) : base(dbContextLocator) { _contentInstallation = contentInstallation; }
public AbortCommandHandler(IContentInstallationService contentInstallation) { _contentInstallation = contentInstallation; }
protected abstract Task UninstallImpl(IContentInstallationService contentInstallation, IContentAction <IUninstallableContent> action);
protected abstract Task InstallImpl(IContentInstallationService installationService, IDownloadContentAction <IInstallableContent> action);
Task InstallInternal(IContentInstallationService contentInstallation, IDownloadContentAction <IInstallableContent> installAction) { ConfirmInstall(); return(InstallImpl(contentInstallation, installAction)); }
public UninstallInstalledItemHandler(IDbContextLocator dbContextLocator, IContentInstallationService contentInstallation) : base(dbContextLocator) { _contentInstallation = contentInstallation; }
public Task <int> Play(IGameLauncherFactory factory, IContentInstallationService contentInstallation, IPlayContentAction <Content> action) => PlayInternal(factory, contentInstallation, action);
protected override Task UninstallImpl(IContentInstallationService contentInstallation, IContentAction <IUninstallableContent> action) => contentInstallation.Uninstall(GetUninstallAction(action));
protected override Task InstallImpl(IContentInstallationService installationService, IDownloadContentAction <IInstallableContent> action) => installationService.Install(GetInstallAction(action));
public PlayContentHandler(IDbContextLocator gameContext, IGameLauncherFactory factory, IContentInstallationService contentInstallation) : base(gameContext) { _factory = factory; _contentInstallation = contentInstallation; }
public ShutdownCommandHandler(IShutdownHandler shutdownHandler, IContentInstallationService contentInstallation) { _shutdownHandler = shutdownHandler; _contentInstallation = contentInstallation; }