Partager via


CommandPrediction.PredictInputAsync Method

Definition

Overloads

PredictInputAsync(PredictionClient, Ast, Token[])

Collect the predictive suggestions from registered predictors using the default timeout.

PredictInputAsync(PredictionClient, Ast, Token[], Int32)

Collect the predictive suggestions from registered predictors using the specified timeout.

PredictInputAsync(PredictionClient, Ast, Token[])

Collect the predictive suggestions from registered predictors using the default timeout.

public static System.Threading.Tasks.Task<System.Collections.Generic.List<System.Management.Automation.Subsystem.Prediction.PredictionResult>?> PredictInputAsync (System.Management.Automation.Subsystem.Prediction.PredictionClient client, System.Management.Automation.Language.Ast ast, System.Management.Automation.Language.Token[] astTokens);
static member PredictInputAsync : System.Management.Automation.Subsystem.Prediction.PredictionClient * System.Management.Automation.Language.Ast * System.Management.Automation.Language.Token[] -> System.Threading.Tasks.Task<System.Collections.Generic.List<System.Management.Automation.Subsystem.Prediction.PredictionResult>>
Public Shared Function PredictInputAsync (client As PredictionClient, ast As Ast, astTokens As Token()) As Task(Of List(Of PredictionResult))

Parameters

client
PredictionClient

Represents the client that initiates the call.

ast
Ast

The Ast object from parsing the current command line input.

astTokens
Token[]

The Token objects from parsing the current command line input.

Returns

A list of PredictionResult objects.

Applies to

PredictInputAsync(PredictionClient, Ast, Token[], Int32)

Collect the predictive suggestions from registered predictors using the specified timeout.

public static System.Threading.Tasks.Task<System.Collections.Generic.List<System.Management.Automation.Subsystem.Prediction.PredictionResult>?> PredictInputAsync (System.Management.Automation.Subsystem.Prediction.PredictionClient client, System.Management.Automation.Language.Ast ast, System.Management.Automation.Language.Token[] astTokens, int millisecondsTimeout);
static member PredictInputAsync : System.Management.Automation.Subsystem.Prediction.PredictionClient * System.Management.Automation.Language.Ast * System.Management.Automation.Language.Token[] * int -> System.Threading.Tasks.Task<System.Collections.Generic.List<System.Management.Automation.Subsystem.Prediction.PredictionResult>>
Public Shared Function PredictInputAsync (client As PredictionClient, ast As Ast, astTokens As Token(), millisecondsTimeout As Integer) As Task(Of List(Of PredictionResult))

Parameters

client
PredictionClient

Represents the client that initiates the call.

ast
Ast

The Ast object from parsing the current command line input.

astTokens
Token[]

The Token objects from parsing the current command line input.

millisecondsTimeout
Int32

The milliseconds to timeout.

Returns

A list of PredictionResult objects.

Applies to