Szerkesztés

Megosztás a következőn keresztül:


ProcessExtensions.StartProcessAsync Method

Definition

Overloads

StartProcessAsync(Process, ProcessStartInfo, Boolean, CancellationToken)

Starts a process asynchronously.

StartProcessAsync(Process, String, String, Boolean, CancellationToken)

Starts a process asynchronously.

StartProcessAsync(Process, ProcessStartInfo, Boolean, CancellationToken)

Starts a process asynchronously.

public static System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.ProcessResult> StartProcessAsync (this System.Diagnostics.Process process, System.Diagnostics.ProcessStartInfo startInfo, bool showDebug = false, System.Threading.CancellationToken cancellationToken = default);
static member StartProcessAsync : System.Diagnostics.Process * System.Diagnostics.ProcessStartInfo * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.ProcessResult>
<Extension()>
Public Function StartProcessAsync (process As Process, startInfo As ProcessStartInfo, Optional showDebug As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ProcessResult)

Parameters

process
Process

This Process.

startInfo
ProcessStartInfo

The Process start info.

showDebug
Boolean

Should output debug code to Editor Console?

cancellationToken
CancellationToken

Returns

ProcessResult

Remarks

The provided Process Start Info must not use shell execution, and should redirect the standard output and errors.

Applies to

StartProcessAsync(Process, String, String, Boolean, CancellationToken)

Starts a process asynchronously.

public static System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.ProcessResult> StartProcessAsync (this System.Diagnostics.Process process, string fileName, string args, bool showDebug = false, System.Threading.CancellationToken cancellationToken = default);
static member StartProcessAsync : System.Diagnostics.Process * string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.MixedReality.Toolkit.Utilities.ProcessResult>
<Extension()>
Public Function StartProcessAsync (process As Process, fileName As String, args As String, Optional showDebug As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ProcessResult)

Parameters

process
Process

This Process.

fileName
String

The process executable to run.

args
String

The Process arguments.

showDebug
Boolean

Should output debug code to Editor Console?

cancellationToken
CancellationToken

Returns

ProcessResult

Applies to