Table of Contents

Class ProgramCommon

Namespace
SunamoCl.SunamoCmdArgs_Cmd
Assembly
SunamoCl.dll

Helper for parsing command-line arguments into typed options and resolving the application mode

public class ProgramCommon
Inheritance
ProgramCommon
Inherited Members
Extension Methods

Methods

ProcessArgs<T, Mode>(string[], Mode)

Parses command-line arguments into typed options and resolves the application mode. For apps that did not use Mode, ModeCl can be used. Mode is no longer used for new applications.

public Tuple<T, Mode>? ProcessArgs<T, Mode>(string[] args, Mode defaultMode) where T : CommonArgs where Mode : struct

Parameters

args string[]

Command-line arguments to parse

defaultMode Mode

Default mode to use when parsing fails

Returns

Tuple<T, Mode>

Tuple of parsed arguments and resolved mode, or null on failure

Type Parameters

T

Arguments type inheriting from CommonArgs

Mode

Enum type representing available application modes