Version: Unity 6.7 Alpha (6000.7)
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.