GeneratedParserAttributeGenerateParseMethods Property

Gets or sets a value that indicates whether to generate an implementation of the IParserTSelf interface for the arguments class.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public bool GenerateParseMethods { get; set; }

Property Value

Boolean
to generate an implementation of the IParserTSelf interface; otherwise, . The default value is , but see the remarks.

Remarks

When this property is , the source generator will add static Parse methods to the arguments class which will create a parser and parse the command line arguments in one go. If using .Net 7.0 or later, this will implement the IParserTSelf interface on the class.

If this property is , only the IParserProviderTSelf interface will be implemented.

The default behavior is to generate an implementation of the IParserTSelf interface methods unless this property is explicitly set to . However, if the class is a subcommand (it implements the ICommand interface and has the CommandAttribute attribute), the default is to not implement the IParserTSelf interface unless this property is explicitly set to .

See Also