BadScript 2
Loading...
Searching...
No Matches
CommandLine.UnParserSettings Class Reference

Provides settings for when formatting command line from an options instance../>. More...

Static Public Member Functions

static UnParserSettings WithGroupSwitchesOnly ()
 Factory method that creates an instance of CommandLine.UnParserSettings with GroupSwitches set to true.
 
static UnParserSettings WithUseEqualTokenOnly ()
 Factory method that creates an instance of CommandLine.UnParserSettings with UseEqualToken set to true.
 

Properties

bool PreferShortName [get, set]
 Gets or sets a value indicating whether unparsing process shall prefer short or long names.
 
bool GroupSwitches [get, set]
 Gets or sets a value indicating whether unparsing process shall group switches.
 
bool UseEqualToken [get, set]
 Gets or sets a value indicating whether unparsing process shall use equal sign with long names.
 
bool ShowHidden [get, set]
 Gets or sets a value indicating whether unparsing process shall expose hidden options.
 
bool SkipDefault [get, set]
 Gets or sets a value indicating whether unparsing process shall skip options with DefaultValue.
 
bool Consumed [get, set]
 

Private Attributes

bool groupSwitches
 
bool preferShortName
 
bool showHidden
 
bool skipDefault
 
bool useEqualToken
 

Detailed Description

Provides settings for when formatting command line from an options instance../>.

Definition at line 18 of file UnParserExtensions.cs.

Member Function Documentation

◆ WithGroupSwitchesOnly()

static UnParserSettings CommandLine.UnParserSettings.WithGroupSwitchesOnly ( )
static

Factory method that creates an instance of CommandLine.UnParserSettings with GroupSwitches set to true.

Returns
A properly initalized CommandLine.UnParserSettings instance.

Definition at line 78 of file UnParserExtensions.cs.

79 {
80 return new UnParserSettings { GroupSwitches = true };
81 }
bool GroupSwitches
Gets or sets a value indicating whether unparsing process shall group switches.

◆ WithUseEqualTokenOnly()

static UnParserSettings CommandLine.UnParserSettings.WithUseEqualTokenOnly ( )
static

Factory method that creates an instance of CommandLine.UnParserSettings with UseEqualToken set to true.

Returns
A properly initalized CommandLine.UnParserSettings instance.

Definition at line 88 of file UnParserExtensions.cs.

89 {
90 return new UnParserSettings { UseEqualToken = true };
91 }
bool UseEqualToken
Gets or sets a value indicating whether unparsing process shall use equal sign with long names.

Member Data Documentation

◆ groupSwitches

bool CommandLine.UnParserSettings.groupSwitches
private

Definition at line 20 of file UnParserExtensions.cs.

◆ preferShortName

bool CommandLine.UnParserSettings.preferShortName
private

Definition at line 21 of file UnParserExtensions.cs.

◆ showHidden

bool CommandLine.UnParserSettings.showHidden
private

Definition at line 22 of file UnParserExtensions.cs.

◆ skipDefault

bool CommandLine.UnParserSettings.skipDefault
private

Definition at line 23 of file UnParserExtensions.cs.

◆ useEqualToken

bool CommandLine.UnParserSettings.useEqualToken
private

Definition at line 24 of file UnParserExtensions.cs.

Property Documentation

◆ Consumed

bool CommandLine.UnParserSettings.Consumed
getsetpackage

Definition at line 71 of file UnParserExtensions.cs.

71{ get; set; }

◆ GroupSwitches

bool CommandLine.UnParserSettings.GroupSwitches
getset

Gets or sets a value indicating whether unparsing process shall group switches.

Definition at line 38 of file UnParserExtensions.cs.

◆ PreferShortName

bool CommandLine.UnParserSettings.PreferShortName
getset

Gets or sets a value indicating whether unparsing process shall prefer short or long names.

Definition at line 29 of file UnParserExtensions.cs.

30 {
31 get => preferShortName;
32 set => PopsicleSetter.Set(Consumed, ref preferShortName, value);
33 }

◆ ShowHidden

bool CommandLine.UnParserSettings.ShowHidden
getset

Gets or sets a value indicating whether unparsing process shall expose hidden options.

Definition at line 56 of file UnParserExtensions.cs.

57 {
58 get => showHidden;
59 set => PopsicleSetter.Set(Consumed, ref showHidden, value);
60 }

◆ SkipDefault

bool CommandLine.UnParserSettings.SkipDefault
getset

Gets or sets a value indicating whether unparsing process shall skip options with DefaultValue.

Definition at line 65 of file UnParserExtensions.cs.

66 {
67 get => skipDefault;
68 set => PopsicleSetter.Set(Consumed, ref skipDefault, value);
69 }

◆ UseEqualToken

bool CommandLine.UnParserSettings.UseEqualToken
getset

Gets or sets a value indicating whether unparsing process shall use equal sign with long names.

Definition at line 47 of file UnParserExtensions.cs.

48 {
49 get => useEqualToken;
50 set => PopsicleSetter.Set(Consumed, ref useEqualToken, value);
51 }

The documentation for this class was generated from the following file: