MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / Invoke

Method Invoke

loader/Main/IFEO.cs:41–65  ·  view source on GitHub ↗
(string args)

Source from the content-addressed store, hash-verified

39 }
40
41 public static void Invoke(string args)
42 {
43 using (var process = new Process
44 {
45 StartInfo = new ProcessStartInfo
46 {
47 FileName = "cmd.exe",
48 Arguments = $"/C {args}",
49 RedirectStandardOutput = true,
50 RedirectStandardError = true,
51 UseShellExecute = false,
52 CreateNoWindow = true
53 }
54 })
55 {
56 process.Start();
57 process.WaitForExit();
58 var error = process.StandardError.ReadToEnd();
59
60 if (process.ExitCode != 0 || !string.IsNullOrEmpty(error))
61 {
62 throw new InvalidOperationException(error);
63 }
64 }
65 }
66 }
67}

Callers 1

DownloadFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected