Contains all necessary info for formatting a value
In "{Items.Length:choose(1,2,3):one|two|three}", the IFormattingInfo.CurrentValue would be the value of "Items.Length", the IFormattingInfo.FormatterOptions would be "1,2,3", and the IFormattingInfo.Format would be "one|two|three".
| Property | Description |
|---|---|
| Alignment | Alignment inserts spaces into the output to ensure consistent length. Positive numbers insert spaces to the left, to right-align the text. Negative numbers insert spaces to the right, to left-align the text. This should only work with the Default Formatter, but is optional with custom formatters. This is primarily for compatibility with String.Format. |
| CurrentValue | The current value that is to be formatted. |
| Format | This format specifies how to output the IFormattingInfo.CurrentValue. |
| FormatDetails | Infrequently used details, often used for debugging |
| FormatterOptions | When a named formatter is used, this will hold the options. For example, in "{0:choose(1,2,3):one|two|three}", FormatterOptions is "1,2,3". |
| Placeholder | Contains all the details about the current placeholder. |
| Method | Description |
|---|---|
| FormatAsChild | Creates a child IFormattingInfo from the current IFormattingInfo instance and invokes formatting with SmartFormatter with the child as parameter. |
| FormattingException | Creates a IFormattingInfo.FormattingException associated with the IFormattingInfo.Format. |
| Write | Writes a string to the output. |