getopt.net
A port of getopt in pure C#.
Loading...
Searching...
No Matches
getopt.net Namespace Reference

Classes

class  CommandOption
 Represents a single argument received via command-line options. More...
 
class  Extensions
 
class  GetOpt
 GetOpt-like class for handling getopt-like command-line arguments in .net. More...
 
class  HelpTextConfig
 A class that contains configuration options for the help text generator. More...
 
struct  Option
 Represents a single long option for getopt. More...
 
class  ParseException
 Generic exception class that is thrown when the parser is not configured to ignore errors. More...
 

Enumerations

enum  ArgumentType { None , Required , Optional }
 Enumeration containing the argument types possible for getopt. More...
 
enum  OptStringPrefix { None , Plus = '+' , Minus = '-' }
 This enumeration contains different prefixes for the generation of shortopt strings. More...
 
enum  OptionConvention { GnuPosix , Windows , Powershell }
 An enumeration of option conventions. More...
 

Enumeration Type Documentation

◆ ArgumentType

Enumeration containing the argument types possible for getopt.

Enumerator
None 

No argument is required for the option.

Required 

The option has a mandatory argument.

Optional 

Arguments are optional for this argument.

Definition at line 8 of file ArgumentType.cs.

8 {
9
13 None,
14
19
24
25 }
@ None
No argument is required for the option.
@ Required
The option has a mandatory argument.
@ Optional
Arguments are optional for this argument.

◆ OptionConvention

An enumeration of option conventions.

Enumerator
GnuPosix 

The GNU/POSIX convention.

Windows 

The Windows convention.

Powershell 

The Powershell convention.

Definition at line 94 of file HelpTextConfig.cs.

94 {
95
100
104 Windows,
105
110
111 }
@ GnuPosix
The GNU/POSIX convention.
@ Powershell
The Powershell convention.
@ Windows
The Windows convention.

◆ OptStringPrefix

This enumeration contains different prefixes for the generation of shortopt strings.

Enumerator
None 

No prefix.

Plus 

If the first character of optstring is '+' or the environment variable POSIXLY_CORRECT is set, then option processing stops as soon as a nonoption argument is encountered.

Minus 

If the first character of optstring is '-', then each nonoption argv-element is handled as if it were the argument of an option with character code 1.

Definition at line 11 of file Extensions.cs.

11 {
15 None,
16
20 Plus = '+',
21
25 Minus = '-'
26 }
@ Plus
If the first character of optstring is '+' or the environment variable POSIXLY_CORRECT is set,...
@ Minus
If the first character of optstring is '-', then each nonoption argv-element is handled as if it were...