CommandLineBuilderExtensions.AddMiddleware Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
AddMiddleware(CommandLineBuilder, Action<InvocationContext>, MiddlewareOrder) |
Aggiunge un delegato middleware alla pipeline di chiamata chiamata prima che venga richiamato un gestore di comandi. |
AddMiddleware(CommandLineBuilder, InvocationMiddleware, MiddlewareOrder) |
Aggiunge un delegato middleware alla pipeline di chiamata chiamata prima che venga richiamato un gestore di comandi. |
AddMiddleware(CommandLineBuilder, Action<InvocationContext>, MiddlewareOrder)
Aggiunge un delegato middleware alla pipeline di chiamata chiamata prima che venga richiamato un gestore di comandi.
public static System.CommandLine.Builder.CommandLineBuilder AddMiddleware (this System.CommandLine.Builder.CommandLineBuilder builder, Action<System.CommandLine.Invocation.InvocationContext> onInvoke, System.CommandLine.Invocation.MiddlewareOrder order = System.CommandLine.Invocation.MiddlewareOrder.Default);
static member AddMiddleware : System.CommandLine.Builder.CommandLineBuilder * Action<System.CommandLine.Invocation.InvocationContext> * System.CommandLine.Invocation.MiddlewareOrder -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function AddMiddleware (builder As CommandLineBuilder, onInvoke As Action(Of InvocationContext), Optional order As MiddlewareOrder = System.CommandLine.Invocation.MiddlewareOrder.Default) As CommandLineBuilder
Parametri
- builder
- CommandLineBuilder
Generatore della riga di comando.
- onInvoke
- Action<InvocationContext>
Delegato che verrà richiamato prima di una chiamata a un gestore di comandi.
- order
- MiddlewareOrder
Valore che indica l'ordine in cui verrà richiamato il delegato aggiunto rispetto ad altri nella pipeline.
Restituisce
Stessa istanza di CommandLineBuilder.
Si applica a
AddMiddleware(CommandLineBuilder, InvocationMiddleware, MiddlewareOrder)
Aggiunge un delegato middleware alla pipeline di chiamata chiamata prima che venga richiamato un gestore di comandi.
public static System.CommandLine.Builder.CommandLineBuilder AddMiddleware (this System.CommandLine.Builder.CommandLineBuilder builder, System.CommandLine.Invocation.InvocationMiddleware middleware, System.CommandLine.Invocation.MiddlewareOrder order = System.CommandLine.Invocation.MiddlewareOrder.Default);
static member AddMiddleware : System.CommandLine.Builder.CommandLineBuilder * System.CommandLine.Invocation.InvocationMiddleware * System.CommandLine.Invocation.MiddlewareOrder -> System.CommandLine.Builder.CommandLineBuilder
<Extension()>
Public Function AddMiddleware (builder As CommandLineBuilder, middleware As InvocationMiddleware, Optional order As MiddlewareOrder = System.CommandLine.Invocation.MiddlewareOrder.Default) As CommandLineBuilder
Parametri
- builder
- CommandLineBuilder
Generatore della riga di comando.
- middleware
- InvocationMiddleware
Delegato che verrà richiamato prima di una chiamata a un gestore di comandi.
- order
- MiddlewareOrder
Valore che indica l'ordine in cui verrà richiamato il delegato aggiunto rispetto ad altri nella pipeline.
Restituisce
Stessa istanza di CommandLineBuilder.