Class SmartFormatter
This class contains the Format method that constructs the composite string by invoking each extension.
Implements
Namespace: UnityEngine .Localization.SmartFormat
Assembly: Unity.Localization.dll
Syntax
[Serializable]
public class SmartFormatter : ISerializationCallbackReceiver
Constructors
Name | Description |
---|---|
Smart |
Creates a new instance of SmartFormatter. |
Properties
Name | Description |
---|---|
Formatter |
Gets the list of IFormatter formatter extensions. |
Parser | Gets or set the instance of the Parser |
Settings | Get the Smart |
Source |
Gets the list of ISource source extensions. |
Methods
Name | Description |
---|---|
Add |
Adds each extensions to this formatter. Each extension must implement IFormatter. |
Add |
Adds each extensions to this formatter. Each extension must implement ISource. |
Format(IList<object>, string) | Replaces one or more format items in a specified string with the string representation of a specific object. |
Format(IFormat |
Replaces one or more format items in a specified string with the string representation of a specific object. |
Format(IFormat |
Replaces one or more format items in a specified string with the string representation of a specific object. |
Format(string, params object[]) | Replaces one or more format items in a specified string with the string representation of a specific object. |
Format(Formatting |
Format the Formatting |
Format |
Writes the formatting result into an IOutput instance. |
Format |
Replaces one or more format items in a specified string with the string representation of a specific object,
using the Format |
Format |
Replaces one or more format items in a specified string with the string representation of a specific object,
using the Format |
Format |
Writes the formatting result into an IOutput instance, using the Format |
Get |
Searches for a Formatter Extension of the given type, and returns it. This can be used to easily find and configure extensions. Returns null if the type cannot be found. |
Get |
Gets all names of registered formatter extensions which are not empty. |
Get |
Searches for a Source Extension of the given type, and returns it. This can be used to easily find and configure extensions. Returns null if the type cannot be found. |
Events
Name | Description |
---|---|
On |
Event raising, if an error occurs during formatting. |