de232555 6a00 4563 60e9 1ad804ea72b2 - akesseler/Plexdata.Utilities.Templates GitHub Wiki

BaseToken Class

The base class of all other token classes.

Inheritance Hierarchy

System.Object
  Plexdata.Utilities.Formatting.Entities.BaseToken
    Plexdata.Utilities.Formatting.Entities.HoleToken
    Plexdata.Utilities.Formatting.Entities.TextToken
Namespace: Plexdata.Utilities.Formatting.Entities
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0

Syntax

C#

internal abstract class BaseToken

The BaseToken type exposes the following members.

Constructors

 

Name Description
Protected method BaseToken(Int32, StringBuilder) Protected parameterized construction.
Protected method BaseToken(Int32, Int32, StringBuilder) Protected parameterized construction.
  Back to Top

Properties

 

Name Description
Public property Format Gets the additional formatting instructions.
Public property IsLeftJustified Indicates if the value alignment is left justified. In such a case the padding should be put behind the value.
Public property IsNumbering Indicates if the symbol can be used as index.
Public property IsRightJustified Indicates if the value alignment is right justified. In such a case the padding should be put in front of the value.
Public property IsSpreading Indicates if the value corresponding to the symbol should be deserialized instead of simply stringifying it.
Public property IsStringify Indicates if the value corresponding to the symbol should simply be converted into a string.
Public property Lining Gets how to line up the formatted data. This is also known as value alignment.
Public property Marker Gets the whole formatting instruction.
Public property Offset Gets the offset within the whole source string.
Public property Rating Gets the rating within the whole source string.
Public property Symbol Gets the symbol (name or index).
  Back to Top

Methods

 

Name Description
Private method ApplyLiningDependencies Applies the properties that depend on property Lining.
Private method ApplySymbolDependencies Applies the properties that depend on property Symbol.
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.)
Protected method Parse Parses the provided marker and applies all properties accordingly.
Public method ToIndex Converts the symbol into an index, if possible, and returns it.
Public method ToLabel Converts the symbol into a label, if possible, and returns it.
Public method ToString Returns a string that represents the current object. (Overrides Object.ToString().)
  Back to Top

Fields

 

Name Description
Private field format This field holds the format value.
Private field lining This field holds the lining value.
Private field marker This field holds the marker value.
Private field offset This field holds the offset value.
Private field rating This field holds the rating value.
Private field symbol This field holds the symbol value.
  Back to Top

Extension Methods

 

Name Description
Private Extension Method AddPadding Adds value padding if necessary. (Defined by TemplateWeaver.)
Private Extension Method CanExpand Determines whether the argument can be expanded. (Defined by ArgumentExtension.)
Private Extension Method GetFormattedValue Converts the argument into its string representation. (Defined by TemplateWeaver.)
Private Extension Method GetPadding Gets the padding length. (Defined by TemplateWeaver.)
Private Extension Method HandleException Converts an exception into a string and returns it. (Defined by TemplateWeaver.)
Public Extension Method IsSystemType Determines whether an argument is of a build-in system type. (Defined by ArgumentExtension.)
Private Extension Method ToFormattedValue Turns the argument into its formatted representation. (Defined by TemplateWeaver.)
Private Extension Method ToSpreadingValue Converts the argument by serializing it. (Defined by TemplateWeaver.)
Private Extension Method ToStringifyValue Converts the argument into a string. (Defined by TemplateWeaver.)
Private Extension Method WeaveHoleToken Formats the related argument and appends it to the result. (Defined by TemplateWeaver.)
Private Extension Method WeaveTextToken Appends a text token to the output. (Defined by TemplateWeaver.)
Private Extension Method WeaveVoidToken Appends a void token to the output. (Defined by TemplateWeaver.)
  Back to Top

Remarks

The internal abstract class serves as base implementation of all other token classes.

See Also

Reference

Plexdata.Utilities.Formatting.Entities Namespace

⚠️ **GitHub.com Fallback** ⚠️