AddExtensions
Adds ISource extensions to the SmartFormatter.GetSourceExtensions list of this formatter, if the Type has not been added before. Sources are inserted at the recommended position, all others are added at the end of the list. If the extension implements IInitializer, IInitializer.Initialize will be invoked. Extensions implementing ISource and IFormatter will be auto-registered for both.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.SmartStrings
- Assembly: UnityEngine.SmartStringsModule
AddExtensions(ISource[])
Adds ISource extensions to the SmartFormatter.GetSourceExtensions list of this formatter, if the Type has not been added before. Sources are inserted at the recommended position, all others are added at the end of the list.
If the extension implements IInitializer, IInitializer.Initialize will be invoked.
Extensions implementing ISourceandIFormatter will be auto-registered for both.
public SmartFormatter AddExtensions(params ISource[] sourceExtensions)
Parameters
Returns
Type | Description |
|---|---|
| SmartFormatter | This SmartFormatter instance. |
AddExtensions(IFormatter[])
Adds IFormatter extensions to the SmartFormatter.GetFormatterExtensions list of this formatter, if the Type has not been added before. Formatters are inserted at the recommended position, all others are added at the end of the list.
If the extension implements IInitializer, IInitializer.Initialize will be invoked.
Extensions implementing ISourceandIFormatter will be auto-registered for both.
public SmartFormatter AddExtensions(params IFormatter[] formatterExtensions)
Parameters
IFormatter extensions in an arbitrary order.
Returns
Type | Description |
|---|---|
| SmartFormatter | This SmartFormatter instance. |