Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

SmartFormatter.AddExtensions

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public SmartFormatter AddExtensions(params ISource[] sourceExtensions);

Parameters

Parameter Description
sourceExtensions ISource extensions in an arbitrary order.

Returns

SmartFormatter This SmartFormatter instance.

Description

Adds ISource extensions to the SmartFormatter.GetSourceExtensions list of this formatter, if the Type has not been added before. Unity.SmartStrings.Extensions.WellKnownExtensionTypes.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.


Declaration

public SmartFormatter AddExtensions(params IFormatter[] formatterExtensions);

Parameters

Parameter Description
formatterExtensions IFormatter extensions in an arbitrary order.

Returns

SmartFormatter This SmartFormatter instance.

Description

Adds IFormatter extensions to the SmartFormatter.GetFormatterExtensions list of this formatter, if the Type has not been added before. Unity.SmartStrings.Extensions.WellKnownExtensionTypes.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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961