Ejemplo n.º 1
0
 public static void Play(ReplayArgs replayArgs)
 {
     using var _ = Process.Start(new ProcessStartInfo
     {
         FileName         = replayArgs.Executable.FullName,
         Arguments        = ReplayArgsStringifier.Stringify(replayArgs, withExecutable: false),
         WorkingDirectory = replayArgs.Executable.DirectoryName,
     });
 }
Ejemplo n.º 2
0
 public static string Stringify(ReplayArgs args, bool withExecutable)
 {
     if (withExecutable)
     {
         return(string.Join(' ', Enumerable
                            .Empty <string>()
                            .Append(args.Executable.FullName.Quote())
                            .Append(args.ReplayFile.FullName.Quote())
                            .Concat(args.ExtraArgs.Select(a => a.Quote()))));
     }
     else
     {
         return(string.Join(' ', Enumerable
                            .Empty <string>()
                            .Append(args.ReplayFile.FullName.Quote())
                            .Concat(args.ExtraArgs.Select(a => a.Quote()))));
     }
 }