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)); }
// TODO: Remove need to recreate Specs.. public static IDownloadContentAction <IInstallableContent> ToInstall( this IPlayContentAction <IContent> action) => new DownloadContentAction( action .Content .DistinctBy(x => x.Content) .Where(x => x.Content is IInstallableContent) .Select(x => new InstallContentSpec((IInstallableContent)x.Content, x.Constraint)) .ToArray(), action.CancelToken) { Force = action.Force, HideLaunchAction = action.HideLaunchAction };
public Task <int> Play(IGameLauncherFactory factory, IContentInstallationService contentInstallation, IPlayContentAction <Content> action) => PlayInternal(factory, contentInstallation, action);