Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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

sourceExtensions

ISource extensions in an arbitrary order.

Returns

Type

Description

SmartFormatterThis 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

formatterExtensions

IFormatter extensions in an arbitrary order.

Returns

Type

Description

SmartFormatterThis SmartFormatter instance.