Skip to content

SystemTarget.GetOrSetExtension(Func<TExtension>)

GetOrSetExtension(Func<TExtension>)

View source
public (TExtension, TExtensionInterface) SystemTarget.GetOrSetExtension<TExtension, TExtensionInterface>(Func<TExtension> newExtensionFunc)
Binds an extension to an addressable object, if not already done.

Parameters

newExtensionFuncFunc<TExtension>
A factory function that constructs a new extension object.

Returns

A tuple, containing first the extension and second an addressable reference to the extension's interface.