Partager via


ICommandPredictor Interface

Definition

Interface for implementing a predictor plugin.

public interface ICommandPredictor : System.Management.Automation.Subsystem.ISubsystem
[System.Runtime.CompilerServices.NullableContext(1)]
public interface ICommandPredictor : System.Management.Automation.Subsystem.ISubsystem
type ICommandPredictor = interface
    interface ISubsystem
[<System.Runtime.CompilerServices.NullableContext(1)>]
type ICommandPredictor = interface
    interface ISubsystem
Public Interface ICommandPredictor
Implements ISubsystem
Attributes
Implements

Properties

Description

Gets the description of a subsystem implementation.

(Inherited from ISubsystem)
FunctionsToDefine

Gets a dictionary that contains the functions to be defined at the global scope of a PowerShell session. Key: function name; Value: function script.

(Inherited from ISubsystem)
Id

Gets the unique identifier for a subsystem implementation.

(Inherited from ISubsystem)
Name

Gets the name of a subsystem implementation.

(Inherited from ISubsystem)

Methods

CanAcceptFeedback(PredictionClient, PredictorFeedbackKind)

Gets a value indicating whether the predictor accepts a specific kind of feedback.

GetSuggestion(PredictionClient, PredictionContext, CancellationToken)

Get the predictive suggestions. It indicates the start of a suggestion rendering session.

OnCommandLineAccepted(PredictionClient, IReadOnlyList<String>)

A command line was accepted to execute. The predictor can start processing early as needed with the latest history.

OnCommandLineExecuted(PredictionClient, String, Boolean)

A command line was done execution.

OnSuggestionAccepted(PredictionClient, UInt32, String)

The suggestion provided by the predictor was accepted.

OnSuggestionDisplayed(PredictionClient, UInt32, Int32)

One or more suggestions provided by the predictor were displayed to the user.

Explicit Interface Implementations

ISubsystem.FunctionsToDefine

Default implementation. No function is required for a predictor.

ISubsystem.Kind

Applies to