Lingua

Command.SetAction Metodo

Definizione

Overload

Nome Descrizione
SetAction(Func<ParseResult,Task>)

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

SetAction(Func<ParseResult,CancellationToken,Task>)

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

SetAction(Func<ParseResult,Task<Int32>>)

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

SetAction(Func<ParseResult,Int32>)

Imposta un'azione sincrona da eseguire quando viene richiamato il comando.

SetAction(Action<ParseResult>)

Imposta un'azione sincrona da eseguire quando viene richiamato il comando.

SetAction(Func<ParseResult,CancellationToken,Task<Int32>>)

Imposta un'azione asincrona quando viene richiamato il comando.

SetAction(Func<ParseResult,Task>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

public:
 void SetAction(Func<System::CommandLine::ParseResult ^, System::Threading::Tasks::Task ^> ^ action);
public void SetAction(Func<System.CommandLine.ParseResult,System.Threading.Tasks.Task> action);
member this.SetAction : Func<System.CommandLine.ParseResult, System.Threading.Tasks.Task> -> unit
Public Sub SetAction (action As Func(Of ParseResult, Task))

Parametri

Commenti

Quando possibile, preferire l'uso dell'overload SetAction(Func<ParseResult,CancellationToken,Task>) e passare il CancellationToken parametro ai metodi asincroni chiamati dall'azione.

Si applica a

SetAction(Func<ParseResult,CancellationToken,Task>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

public:
 void SetAction(Func<System::CommandLine::ParseResult ^, System::Threading::CancellationToken, System::Threading::Tasks::Task ^> ^ action);
public void SetAction(Func<System.CommandLine.ParseResult,System.Threading.CancellationToken,System.Threading.Tasks.Task> action);
member this.SetAction : Func<System.CommandLine.ParseResult, System.Threading.CancellationToken, System.Threading.Tasks.Task> -> unit
Public Sub SetAction (action As Func(Of ParseResult, CancellationToken, Task))

Parametri

Si applica a

SetAction(Func<ParseResult,Task<Int32>>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione asincrona da eseguire quando viene richiamato il comando.

public:
 void SetAction(Func<System::CommandLine::ParseResult ^, System::Threading::Tasks::Task<int> ^> ^ action);
public void SetAction(Func<System.CommandLine.ParseResult,System.Threading.Tasks.Task<int>> action);
member this.SetAction : Func<System.CommandLine.ParseResult, System.Threading.Tasks.Task<int>> -> unit
Public Sub SetAction (action As Func(Of ParseResult, Task(Of Integer)))

Parametri

Commenti

Quando possibile, preferire l'uso dell'overload SetAction(Func<ParseResult,CancellationToken,Task<Int32>>) e passare il CancellationToken parametro ai metodi asincroni chiamati dall'azione.

Si applica a

SetAction(Func<ParseResult,Int32>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione sincrona da eseguire quando viene richiamato il comando.

public:
 void SetAction(Func<System::CommandLine::ParseResult ^, int> ^ action);
public void SetAction(Func<System.CommandLine.ParseResult,int> action);
member this.SetAction : Func<System.CommandLine.ParseResult, int> -> unit
Public Sub SetAction (action As Func(Of ParseResult, Integer))

Parametri

Commenti

Il valore restituito dal action delegato può essere usato per impostare il codice di uscita del processo.

Si applica a

SetAction(Action<ParseResult>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione sincrona da eseguire quando viene richiamato il comando.

public:
 void SetAction(Action<System::CommandLine::ParseResult ^> ^ action);
public void SetAction(Action<System.CommandLine.ParseResult> action);
member this.SetAction : Action<System.CommandLine.ParseResult> -> unit
Public Sub SetAction (action As Action(Of ParseResult))

Parametri

Si applica a

SetAction(Func<ParseResult,CancellationToken,Task<Int32>>)

Origine:
Command.cs
Origine:
Command.cs

Imposta un'azione asincrona quando viene richiamato il comando.

public:
 void SetAction(Func<System::CommandLine::ParseResult ^, System::Threading::CancellationToken, System::Threading::Tasks::Task<int> ^> ^ action);
public void SetAction(Func<System.CommandLine.ParseResult,System.Threading.CancellationToken,System.Threading.Tasks.Task<int>> action);
member this.SetAction : Func<System.CommandLine.ParseResult, System.Threading.CancellationToken, System.Threading.Tasks.Task<int>> -> unit
Public Sub SetAction (action As Func(Of ParseResult, CancellationToken, Task(Of Integer)))

Parametri

Commenti

Il valore restituito dal action delegato può essere usato per impostare il codice di uscita del processo.

Si applica a