FormattingInfo
The class contains the fields and methods which are necessary for formatting.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Class
- Namespace: Unity.SmartStrings.Core.Formatting
- Assembly: UnityEngine.SmartStringsModule
- Implements: IFormattingInfo, ISelectorInfo
public class FormattingInfo : IFormattingInfo, ISelectorInfo
Properties
Property | Description |
|---|---|
| Alignment | The alignment of the current Placeholder, or, if that is |
| 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. |
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 FormattingInfoPool when it releases an instance. |
| Write | Writes the ReadOnlySpan_1 text parameter to the IOutput and takes care of alignment. |