Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

FormattingInfo

class in Unity.SmartStrings.Core.Formatting


Implements interfaces:IFormattingInfo, ISelectorInfo

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The class contains the fields and methods which are necessary for formatting.

Properties

Property Description
Alignment The alignment of the current Placeholder, or, if that is null, the alignment inherited from the nearest parent IFormattingInfo whose alignment is not zero.
CurrentValue The current value being formatted.
Format The parsed format that specifies how to output the current value.
FormatDetails Extra details shared across the current formatting operation.
FormatterOptions The formatter options of the current Placeholder.
Parent The parent FormattingInfo that created this instance.
Placeholder The Placeholder currently being formatted.
Result The result after an ISource has assigned a value.
Selector The Selector currently being evaluated.
SelectorIndex The index of the current Selector in the selector list.
SelectorOperator The operator string of the current Selector, for example a comma or dot.
SelectorText The raw text of the current Selector.

Public Methods

Method Description
CreateChild Creates a child IFormattingInfo from the current IFormattingInfo instance for a FormattingInfo.Placeholder.
FormatAsChild Creates a child IFormattingInfo from the current IFormattingInfo instance and invokes formatting with SmartFormatter and with the child as parameter.
FormattingException Creates a new FormattingInfo.FormattingException.
Initialize Initializes this formatting info with the details required for formatting.
ReturnToPool Returns this instance and its FormattingInfo children to the object pool. This method gets called by Unity.SmartStrings.Pooling.SmartPools.FormattingInfoPool when it releases an instance.
Write Writes the string parameter to the IOutput and takes care of alignment.