Class SyncOptionAction
- Namespace
- Albatross.CommandLine
- Assembly
- Albatross.CommandLine.dll
A synchronous command line action that wraps a custom sync handler function. This action is non-terminating, allowing subsequent actions to execute.
public sealed class SyncOptionAction : SynchronousCommandLineAction
- Inheritance
-
SyncOptionAction
- Inherited Members
Constructors
SyncOptionAction(Func<ParseResult, int>)
Creates a new sync option action with the specified handler function.
public SyncOptionAction(Func<ParseResult, int> handler)
Parameters
handlerFunc<ParseResult, int>The sync function to execute when the action is invoked.
Properties
Terminating
Indicates that the action terminates a command line invocation, and later actions are skipped.
public override bool Terminating { get; }
Property Value
Methods
Invoke(ParseResult)
Performs an action when the associated symbol is invoked on the command line.
public override int Invoke(ParseResult parseResult)
Parameters
parseResultParseResultProvides the parse results.
Returns
- int
A value that can be used as the exit code for the process.