Skip to content

T_CommandLine_ParserResult_1

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

ParserResult(T) Class

Models a parser result. When inherited by Parsed(T), it contains an instance of type T with parsed values. When inherited by NotParsed(T), it contains a sequence of Error.

Inheritance Hierarchy

System.Object
  CommandLine.ParserResult(T)
    CommandLine.NotParsed(T)
    CommandLine.Parsed(T)
Namespace: CommandLine
Assembly: CommandLine (in CommandLine.dll) Version: 0.0.0

Syntax

C#

public abstract class ParserResult<T>

VB

Public MustInherit Class ParserResult(Of T)

C++

generic<typename T>
public ref class ParserResult abstract

F#

[<AbstractClassAttribute>]
type ParserResult<'T> =  class end

Type Parameters

 

T
The type with attributes that define the syntax of parsing rules.
  The ParserResult(T) type exposes the following members.

Constructors

 

Name Description
Protected method ParserResult(T) Initializes a new instance of the ParserResult(T) class
  Back to Top

Properties

 

Name Description
Public property Tag Parser result type discriminator, defined as ParserResultType enumeration.
Public property TypeInfo
  Back to Top

Methods

 

Name Description
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.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
  Back to Top

Extension Methods

 

Name Description
Private Extension Method IsEmpty (Defined by UnParserExtensions.)
Public Extension Method MapResult(TSource, TResult) Provides a way to transform result data into another value. (Defined by ParserResultExtensions.)
Private Extension Method NormalizeValue (Defined by UnParserExtensions.)
Public Extension Method WithNotParsed(T) Executes action if ParserResult(T) lacks parsed values and contains errors. (Defined by ParserResultExtensions.)
Public Extension Method WithParsed(T) Executes action if ParserResult(T) contains parsed values. (Defined by ParserResultExtensions.)
  Back to Top

See Also

Reference

CommandLine Namespace

Clone this wiki locally