ProgramArgs Class
Defines conventional command-line arguments.
Namespace
Songhay.Models
Base Types
  • object
graph BT Type-->Base0["object"] Type["ProgramArgs"] class Type type-node

Syntax

public class ProgramArgs

Constructors

Name Summary
ProgramArgs(string[]) Initializes a new instance of the ProgramArgs class.

Fields

Name Field Type Constant Value Summary
BasePath string --base-path
The base-path argument.
static
BasePathRequired string --base-path-required
The base path required argument.
static
Help string --help
The help argument.
static
InputFile string --input-file
The input file argument.
static
InputString string --input-string
The input string argument.
static
OutputFile string --output-file
The output file argument.
static
OutputUnderBasePath string --output-under-base-path
Use the output file argument relative to BasePath.
static
SettingsFile string --settings-file
The settings file argument.
static

Properties

Name Property Type Summary
Args string[]
Gets the arguments.
HelpSet Dictionary<string, string>
Gets the help set.

Extension Methods

Name Value Summary
GetArgValue(string) string
Gets the argument value.
GetBasePathValue() string
Gets the conventional base-path value.
GetOutputPath() string
Gets the path to the output file specified by conventional arguments.
GetSettings() string
Gets the conventional settings file string content.
GetSettingsFilePath() string
Gets the conventional settings file path.
GetStringInput() string
Gets string input from either InputString or InputFile.
HasArg(string, bool) bool
Determines whether the specified ProgramArgs has argument.
IsAssignableToISerializable<ProgramArgs>() bool
Determines whether the specified type can be assigned to System.Runtime.Serialization.ISerializable.
IsHelpRequest() bool
Determines whether args contain the Help flag.
ToConfigurationKey(string) string
Converts the args key to a conventional Configuration key.
ToHelpDisplayText(int) string
Converts the args key any help text.
ToHelpDisplayText() string
Converts the args key any help text.
ToObjectOrDbNull<ProgramArgs>() object
Boxes the nullable in object or returns DBNull.
ToReferenceTypeValueOrThrow<ProgramArgs>(string) T
Returns the non-null value of the specified, nullable reference type or throws an ArgumentNullException when the value is null.
WithDefaultHelpText() ProgramArgs
Returns ProgramArgs
WriteOutputToFile(byte[]) void
Writes the byte array output to the file specified by OutputFile.
WriteOutputToFile(Stream) void
Writes the Stream output to the file specified by OutputFile.
WriteOutputToFile(string) void
Writes the string output to the file specified by OutputFile.