Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

M_CommandLine_Text_HelpText_AutoBuild__1

Moh.Hassan edited this page Oct 10, 2019 · 1 revision

HelpText.AutoBuild(T) Method (ParserResult(T), Func(HelpText, HelpText), Func(Example, Example), Boolean, Int32)

Creates a new instance of the HelpText class using common defaults.

Namespace: CommandLine.Text
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public static HelpText AutoBuild<T>(
	ParserResult<T> parserResult,
	Func<HelpText, HelpText> onError,
	Func<Example, Example> onExample,
	bool verbsIndex = false,
	int maxDisplayWidth = 80
)

VB

Public Shared Function AutoBuild(Of T) ( 
	parserResult As ParserResult(Of T),
	onError As Func(Of HelpText, HelpText),
	onExample As Func(Of Example, Example),
	Optional verbsIndex As Boolean = false,
	Optional maxDisplayWidth As Integer = 80
) As HelpText

C++

public:
generic<typename T>
static HelpText^ AutoBuild(
	ParserResult<T>^ parserResult, 
	Func<HelpText^, HelpText^>^ onError, 
	Func<Example^, Example^>^ onExample, 
	bool verbsIndex = false, 
	int maxDisplayWidth = 80
)

F#

static member AutoBuild : 
        parserResult : ParserResult<'T> * 
        onError : Func<HelpText, HelpText> * 
        onExample : Func<Example, Example> * 
        ?verbsIndex : bool * 
        ?maxDisplayWidth : int 
(* Defaults:
        let _verbsIndex = defaultArg verbsIndex false
        let _maxDisplayWidth = defaultArg maxDisplayWidth 80
*)
-> HelpText 

Parameters

 

parserResult
Type: CommandLine.ParserResult(T)
The ParserResult(T) containing the instance that collected command line arguments parsed with Parser class.
onError
Type: System.Func(HelpText, HelpText)
A delegate used to customize the text block of reporting parsing errors text block.
onExample
Type: System.Func(Example, Example)
A delegate used to customize Example model used to render text block of usage examples.
verbsIndex (Optional)
Type: System.Boolean
If true the output style is consistent with verb commands (no dashes), otherwise it outputs options.
maxDisplayWidth (Optional)
Type: System.Int32
The maximum width of the display.

Type Parameters

 

T

Return Value

Type: HelpText
An instance of HelpText class.

Remarks

The parameter verbsIndex is not ontly a metter of formatting, it controls whether to handle verbs or options.

See Also

Reference

HelpText Class
AutoBuild Overload
CommandLine.Text Namespace

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.