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#

public class HelpText

VB

Public Class HelpText

C++

public ref class HelpText

F#

type HelpText =  class end

The HelpText type exposes the following members.

Constructors

 

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

Properties

 

Name Description
Public property AddDashesToOption Gets or sets a value indicating whether the format of options should contain dashes. It modifies behavior of AddOptions(T)(ParserResult(T)) method.
Public property AddEnumValuesToHelpText Gets or sets a value indicating whether to add the values of an enum after the description of the specification.
Public property AdditionalNewLineAfterOption Gets or sets a value indicating whether to add an additional line after the description of the specification.
Public property AutoHelp Gets or sets a value indicating whether implicit option or verb 'help' should be supported.
Public property AutoVersion Gets or sets a value indicating whether implicit option or verb 'version' should be supported.
Public property Copyright Gets or sets the copyright string. You can directly assign a CopyrightInfo instance.
Public property Heading Gets or sets the heading string. You can directly assign a HeadingInfo instance.
Public property MaximumDisplayWidth Gets or sets the maximum width of the display. This determines word wrap when displaying the text.
Public property OptionComparison
Public property SentenceBuilder Gets the SentenceBuilder instance specified in constructor.
  Back to Top

Methods

 

Name Description
Private method AdaptVerbsToSpecifications
Private method AddLine(StringBuilder, String)
Protected methodStatic member AddLine(StringBuilder, String, Int32)
Private method AddOption
Private method AddOptionName
Public method AddOptions(T)(ParserResult(T)) Adds a text block with options usage string.
Public method AddOptions(T)(Int32, ParserResult(T)) Adds a text block with options usage string.
Private method AddOptionsImpl
Public method AddPostOptionsLine Adds a text line at the bottom, after options usage string.
Public method AddPostOptionsLines Adds text lines at the bottom, after options usage string.
Public method AddPostOptionsText Adds a text block of lines at the bottom, after options usage string.
Public method AddPreOptionsLine(String) Adds a text line after copyright and before options usage strings.
Private method AddPreOptionsLine(String, Int32)
Public method AddPreOptionsLines Adds text lines after copyright and before options usage strings.
Public method AddPreOptionsText Adds a text block of lines after copyright and before options usage strings.
Private method AddValueName
Public method AddVerbs(Type[]) Adds a text block with verbs usage string.
Public method AddVerbs(Int32, Type[]) Adds a text block with verbs usage string.
Public methodStatic member AutoBuild(T)(ParserResult(T), Int32) Creates a new instance of the HelpText class, automatically handling verbs or options scenario.
Public methodStatic member AutoBuild(T)(ParserResult(T), Func(HelpText, HelpText), Func(Example, Example), Boolean, Int32) Creates a new instance of the HelpText class using common defaults.
Public methodStatic member DefaultParsingErrorsHandler(T) Supplies a default parsing error handler implementation.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize 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 member FormatDefaultValue(T)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Private method GetMaxLength
Private method GetMaxOptionLength
Private method GetMaxValueLength
Private method GetSpecificationsFromType
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Private methodStatic member GetUsageFromType
Private method MakeHelpEntry
Private method MakeVersionEntry
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic member RenderParsingErrorsText(T) Builds a string that contains a parsing error message.
Public methodStatic member RenderParsingErrorsTextAsLines(T) Builds a sequence of string that contains a parsing error message.
Public methodStatic member RenderUsageText(T)(ParserResult(T)) Builds a string with usage text block created using UsageAttribute data and metadata.
Public methodStatic member RenderUsageText(T)(ParserResult(T), Func(Example, Example)) Builds a string with usage text block created using UsageAttribute data and metadata.
Public methodStatic member RenderUsageTextAsLines(T) Builds a string sequence with usage text block created using UsageAttribute data and metadata.
Private method ToComparableOption
Public method ToString Returns the help screen as a String. (Overrides Object.ToString().)
  Back to Top

Operators

 

Name Description
Public operatorStatic member Implicit(HelpText to String) Converts the help instance to a String.
  Back to Top

Fields

 

Name Description
Public fieldStatic member RequiredThenAlphaComparison
  Back to Top

Extension Methods

 

Name Description
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
  Back to Top

See Also

Reference

CommandLine.Text Namespace

Clone this wiki locally