Skip to content

T_CommandLine_Text_HelpText

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

HelpText Class

Inheritance Hierarchy

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

Syntax

C#

publicclass HelpText

VB

PublicClassHelpText

C++

public ref classHelpText

F#

typeHelpText=classend

The HelpText type exposes the following members.

Constructors

NameDescription
Private methodStatic memberHelpText
Public methodHelpText() Initializes a new instance of the HelpText class.
Public methodHelpText(String) Initializes a new instance of the HelpText class specifying heading string.
Public methodHelpText(SentenceBuilder) Initializes a new instance of the HelpText class specifying the sentence builder.
Public methodHelpText(String, String) Initializes a new instance of the HelpText class specifying heading and copyright strings.
Public methodHelpText(SentenceBuilder, String) Initializes a new instance of the HelpText class specifying the sentence builder and heading string.
Public methodHelpText(SentenceBuilder, String, String) Initializes a new instance of the HelpText class specifying heading and copyright strings.
Back to Top

Properties

NameDescription
Public propertyAddDashesToOption Gets or sets a value indicating whether the format of options should contain dashes. It modifies behavior of AddOptions(T)(ParserResult(T)) method.
Public propertyAddEnumValuesToHelpText Gets or sets a value indicating whether to add the values of an enum after the description of the specification.
Public propertyAdditionalNewLineAfterOption Gets or sets a value indicating whether to add an additional line after the description of the specification.
Public propertyAutoHelp Gets or sets a value indicating whether implicit option or verb 'help' should be supported.
Public propertyAutoVersion Gets or sets a value indicating whether implicit option or verb 'version' should be supported.
Public propertyCopyright Gets or sets the copyright string. You can directly assign a CopyrightInfo instance.
Public propertyHeading Gets or sets the heading string. You can directly assign a HeadingInfo instance.
Public propertyMaximumDisplayWidth Gets or sets the maximum width of the display. This determines word wrap when displaying the text.
Public propertyOptionComparison
Public propertySentenceBuilder Gets the SentenceBuilder instance specified in constructor.
Back to Top

Methods

NameDescription
Private methodAdaptVerbsToSpecifications
Private methodAddLine(StringBuilder, String)
Protected methodStatic memberAddLine(StringBuilder, String, Int32)
Private methodAddOption
Private methodAddOptionName
Public methodAddOptions(T)(ParserResult(T)) Adds a text block with options usage string.
Public methodAddOptions(T)(Int32, ParserResult(T)) Adds a text block with options usage string.
Private methodAddOptionsImpl
Public methodAddPostOptionsLine Adds a text line at the bottom, after options usage string.
Public methodAddPostOptionsLines Adds text lines at the bottom, after options usage string.
Public methodAddPostOptionsText Adds a text block of lines at the bottom, after options usage string.
Public methodAddPreOptionsLine(String) Adds a text line after copyright and before options usage strings.
Private methodAddPreOptionsLine(String, Int32)
Public methodAddPreOptionsLines Adds text lines after copyright and before options usage strings.
Public methodAddPreOptionsText Adds a text block of lines after copyright and before options usage strings.
Private methodAddValueName
Public methodAddVerbs(Type[]) Adds a text block with verbs usage string.
Public methodAddVerbs(Int32, Type[]) Adds a text block with verbs usage string.
Public methodStatic memberAutoBuild(T)(ParserResult(T), Int32) Creates a new instance of the HelpText class, automatically handling verbs or options scenario.
Public methodStatic memberAutoBuild(T)(ParserResult(T), Func(HelpText, HelpText), Func(Example, Example), Boolean, Int32) Creates a new instance of the HelpText class using common defaults.
Public methodStatic memberDefaultParsingErrorsHandler(T) Supplies a default parsing error handler implementation.
Public methodEquals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Private methodStatic memberFormatDefaultValue(T)
Public methodGetHashCode Serves as the default hash function. (Inherited from Object.)
Private methodGetMaxLength
Private methodGetMaxOptionLength
Private methodGetMaxValueLength
Private methodGetSpecificationsFromType
Public methodGetType Gets the Type of the current instance. (Inherited from Object.)
Private methodStatic memberGetUsageFromType
Private methodMakeHelpEntry
Private methodMakeVersionEntry
Protected methodMemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberRenderParsingErrorsText(T) Builds a string that contains a parsing error message.
Public methodStatic memberRenderParsingErrorsTextAsLines(T) Builds a sequence of string that contains a parsing error message.
Public methodStatic memberRenderUsageText(T)(ParserResult(T)) Builds a string with usage text block created using UsageAttribute data and metadata.
Public methodStatic memberRenderUsageText(T)(ParserResult(T), Func(Example, Example)) Builds a string with usage text block created using UsageAttribute data and metadata.
Public methodStatic memberRenderUsageTextAsLines(T) Builds a string sequence with usage text block created using UsageAttribute data and metadata.
Private methodToComparableOption
Public methodToString Returns the help screen as a String. (Overrides Object.ToString().)
Back to Top

Operators

NameDescription
Public operatorStatic memberImplicit(HelpText to String) Converts the help instance to a String.
Back to Top

Fields

NameDescription
Public fieldStatic memberRequiredThenAlphaComparison
Back to Top

Extension Methods

NameDescription
Private Extension MethodIsEmpty (Defined by UnParserExtensions.)
Private Extension MethodNormalizeValue (Defined by UnParserExtensions.)
Back to Top

See Also

Reference

CommandLine.Text Namespace

Clone this wiki locally