Изменения документа System. Diagnostics. Process

Редактировал(а) Alexandr Fokin 2023/05/07 13:08

От версии 2.1
отредактировано Alexandr Fokin
на 2022/06/06 14:40
Изменить комментарий: К данной версии нет комментариев
К версии 3.4
отредактировано Alexandr Fokin
на 2023/05/07 13:08
Изменить комментарий: К данной версии нет комментариев

Сводка

Подробности

Свойства страницы
Название
... ... @@ -1,1 +1,1 @@
1 -System.Diagnostics.Process
1 +System. Diagnostics. Process
Родительский документ
... ... @@ -1,1 +1,1 @@
1 -Разработка.NET.C#.WebHome
1 +Разработка.NET.Библиотеки.Инструменты.WebHome
Содержимое
... ... @@ -1,16 +1,18 @@
1 1  Process.start: how to get the output?
2 2  https://stackoverflow.com/questions/4291912/process-start-how-to-get-the-output
3 3  
4 +EXECUTE A BASH SCRIPT VIA C#/.NET CORE
5 +https://jackma.com/2019/04/20/execute-a-bash-script-via-c-net-core/
6 +
4 4  ----
5 5  
6 -Template
7 -
8 -{{code language="c#"}}
9 -ProcessStartInfo info = new ProcessStartInfo();
9 +|(% style="width:129px" %)Template|(% style="width:1393px" %){{code language="c#"}}ProcessStartInfo info = new ProcessStartInfo();
10 10  // fill info ...
11 +info.RedirectStandardOutput = true;
12 +info.RedirectStandardError = true;
11 11  
12 12  //token.ThrowIfCancellationRequested();
13 -Process process = Process.Start(info);
15 +using Process process = Process.Start(info);
14 14  try
15 15  {
16 16   await process.WaitForExitAsync(token);
... ... @@ -32,5 +32,9 @@
32 32  else
33 33  {
34 34   //Error
35 -}
36 -{{/code}}
37 +}{{/code}}
38 +|(% style="width:129px" %)Arguments (args)|(% style="width:1393px" %)[[Command Line Arguments Parser>>doc:Разработка.NET.Библиотеки.Документы.Форматы данных и схемы.Command Line Arguments Parser.WebHome]]
39 +|(% style="width:129px" %) |(% style="width:1393px" %)
40 +
41 +
42 +