HelpSyntaxParameter
ConsoleMonster.Help
A parameter as it appears in a syntax line.
Inheritance
- object
- HelpSyntaxParameter
Usage
Explore 21 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 9
- Property HelpSyntax.Parameters
- Extension method HelpSyntaxParameter.Named
- Extension method HelpSyntaxParameter.Positional
- Extension method HelpSyntaxParameter.Required
- Extension method HelpSyntaxParameter.Type
- Method HelpSyntaxParameterFluent.Named
- Method HelpSyntaxParameterFluent.Positional
- Method HelpSyntaxParameterFluent.Required
- Method HelpSyntaxParameterFluent.Type
Accepted by parameters 12
- Extension method HelpSyntax.Parameter
- Extension method HelpSyntax.Parameters
- Method HelpSyntaxFluent.Parameter
- Method HelpSyntaxFluent.Parameters
- Extension method HelpSyntaxParameter.Named
- Extension method HelpSyntaxParameter.Positional
- Extension method HelpSyntaxParameter.Required
- Extension method HelpSyntaxParameter.Type
- Method HelpSyntaxParameterFluent.Named
- Method HelpSyntaxParameterFluent.Positional
- Method HelpSyntaxParameterFluent.Required
- Method HelpSyntaxParameterFluent.Type
Constructors
public HelpSyntaxParameter(string name) #Creates a syntax parameter.
Parameters
- name string
- The supplied name. With Named enabled the renderer adds one dash; use -output to display --output.
Inherited Methods
Properties
public string Name { get; } #The supplied name. With Named enabled the renderer adds one dash; use -output to display --output.
public string? Type { get; set; } #The value type (for example string[]), or null for a switch.
public bool Positional { get; set; } #Whether its name may be left out (a position is given).
public bool Named { get; set; } #Whether the syntax includes a name with one renderer-added dash (default true). Supply -output for --output. False renders only the positional value placeholder.
Extension Methods
public static HelpSyntaxParameter Named(HelpSyntaxParameter helpSyntaxParameter, bool value = true) #Sets HelpSyntaxParameter.Named: Whether the syntax includes a name with one renderer-added dash (default true). Supply -output for --output. False renders only the positional value placeholder.
Parameters
- helpSyntaxParameter ConsoleMonster.Help.HelpSyntaxParameter
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
helpSyntaxParameter.Named = value; helpSyntaxParameter.Named(value);public static HelpSyntaxParameter Positional(HelpSyntaxParameter helpSyntaxParameter, bool value = true) #Sets HelpSyntaxParameter.Positional: Whether its name may be left out (a position is given).
Parameters
- helpSyntaxParameter ConsoleMonster.Help.HelpSyntaxParameter
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
helpSyntaxParameter.Positional = value; helpSyntaxParameter.Positional(value);public static HelpSyntaxParameter Required(HelpSyntaxParameter helpSyntaxParameter, bool value = true) #Sets HelpSyntaxParameter.Required: Whether it is required.
Parameters
- helpSyntaxParameter ConsoleMonster.Help.HelpSyntaxParameter
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
helpSyntaxParameter.Required = value; helpSyntaxParameter.Required(value);public static HelpSyntaxParameter Type(HelpSyntaxParameter helpSyntaxParameter, string? value) #Sets HelpSyntaxParameter.Type: The value type (for example string[]), or null for a switch.
Parameters
- helpSyntaxParameter ConsoleMonster.Help.HelpSyntaxParameter
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
helpSyntaxParameter.Type = value; helpSyntaxParameter.Type(value);