文档

Unity Engine

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.
阅读时间2 分钟最后更新于 1 个月前

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.