Class CommandLineApplication
Base class for command line applications.
Inherited Members
Namespace: Solti.Utils.Rpc.Internals
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class CommandLineApplication
Constructors
CommandLineApplication(IReadOnlyList<String>)
Creates a new CommandLineApplication instance.
Declaration
public CommandLineApplication(IReadOnlyList<string> args)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<String> | args |
Properties
Args
The command line arguments
Declaration
public IReadOnlyList<string> Args { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<String> |
Methods
GetParsedArguments<T>()
Parses the command line arguments to a typed object.
Declaration
protected T GetParsedArguments<T>()
where T : new()
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
OnRun()
The default behavior.
Declaration
public virtual void OnRun()
OnUnhandledException(Exception)
Called on unhandled exception
Declaration
public virtual void OnUnhandledException(Exception ex)
Parameters
Type | Name | Description |
---|---|---|
Exception | ex |
Run()
Runs the application
Declaration
public int Run()
Returns
Type | Description |
---|---|
Int32 |