public static GameLauncherProcessInternal.GameLauncher.GameLaunchSpec ToLaunchSpec(
            this LaunchGameWithSteamInfo info)
        {
            var spec = ((LaunchGameInfoBase)info).ToLaunchSpec();

            spec.SteamDRM = info.SteamDRM;
            spec.SteamID  = info.SteamAppId;

            return(spec);
        }
        public static async Task <LaunchGameWithSteamInfo> FakeLaunchGameWithSteam(this ILaunchWithSteam mediator,
                                                                                   RealVirtualityGame game)
        {
            LaunchGameWithSteamInfo parameters = null;

            A.CallTo(() => mediator.Launch(A <LaunchGameWithSteamInfo> ._))
            .Invokes((LaunchGameWithSteamInfo x) => parameters = x)
            .ReturnsLazily(() => Task.FromResult(default(Process)));
            await game.Launch((dynamic)mediator);

            return(parameters);
        }
 public SULaunchGameSteamArgumentsBuilder(LaunchGameWithSteamInfo spec, IAbsoluteDirectoryPath steamPath)
     : base(spec)
 {
     if (steamPath == null)
     {
         throw new ArgumentNullException(nameof(steamPath));
     }
     if (!(spec.SteamAppId > 0))
     {
         throw new ArgumentNullException("spec.SteamAppId > 0");
     }
     _steamPath = steamPath;
     _spec      = spec;
 }
示例#4
0
 public Task <Process> LaunchInternal(LaunchGameWithSteamInfo info) => PerformUpdaterAction(info,
                                                                                            new SULaunchGameSteamArgumentsBuilder(info, GetAndValidateSteamPath(info.SteamDRM, false))
                                                                                            .Build());
 public Task <Process> LaunchInternal(LaunchGameWithSteamInfo info)
 {
     throw new NotImplementedException();
 }
 public Task <Process> Launch(LaunchGameWithSteamInfo spec) => LaunchInternal(spec);
 public Task<Process> Launch(LaunchGameWithSteamInfo spec) {
     return LaunchInternal(spec);
 }
 public async Task <Process> LaunchInternal(LaunchGameWithSteamInfo info)
 => Process.GetProcessById(CreateLauncher().LaunchGame(info.ToLaunchSpec()));
示例#9
0
 protected Task <Process> LaunchInternal(LaunchGameWithSteamInfo info) => _gameLauncherInfra.LaunchInternal(info);