Class FormatDetails
Contains extra information about the item currently being formatted. These objects are not often used, so they are all wrapped up here.
Namespace: UnityEngine.Localization.SmartFormat.Core.Formatting
Syntax
public class FormatDetails
Constructors
FormatDetails(SmartFormatter, Format, Object[], FormatCache, IFormatProvider, IOutput)
Declaration
public FormatDetails(SmartFormatter formatter, Format originalFormat, object[] originalArgs, FormatCache formatCache, IFormatProvider provider, IOutput output)
Parameters
Type | Name | Description |
---|---|---|
SmartFormatter | formatter | |
Format | originalFormat | |
Object[] | originalArgs | |
FormatCache | formatCache | |
IFormatProvider | provider | |
IOutput | output |
Properties
FormatCache
This object can be used to cache resources between formatting calls. It will be null unless FormatWithCache is called.
Declaration
public FormatCache FormatCache { get; }
Property Value
Type | Description |
---|---|
FormatCache |
Formatter
The original formatter responsible for formatting this item. It can be used for evaluating nested formats.
Declaration
public SmartFormatter Formatter { get; }
Property Value
Type | Description |
---|---|
SmartFormatter |
FormattingException
If ErrorAction is set to OutputErrorsInResult, this will contain the exception that caused the formatting error.
Declaration
public FormattingException FormattingException { get; set; }
Property Value
Type | Description |
---|---|
FormattingException |
OriginalArgs
The original set of arguments passed to the format function. These provide global-access to the original arguments.
Declaration
public object[] OriginalArgs { get; }
Property Value
Type | Description |
---|---|
Object[] |
OriginalFormat
Gets the original Format returned by the parser.
Declaration
public Format OriginalFormat { get; }
Property Value
Type | Description |
---|---|
Format |
Output
Gets the IOutput where the result is written.
Declaration
public IOutput Output { get; }
Property Value
Type | Description |
---|---|
IOutput |
Provider
The Format Provider that can be used to determine how to format items such as numbers, dates, and anything else that might be culture-specific.
Declaration
public IFormatProvider Provider { get; }
Property Value
Type | Description |
---|---|
IFormatProvider |
Settings
Contains case-sensitivity settings
Declaration
public SmartSettings Settings { get; }
Property Value
Type | Description |
---|---|
SmartSettings |