Open sandboxFocus

Method WithTemplateProvider

WithTemplateProvider(ITemplateProvider)

Sets the object that declares the template. By default, it is the aspect or the fabric that makes the registration.

Declaration
ITemplateRegistration WithTemplateProvider(ITemplateProvider templateProvider)
Parameters
Type Name Description
ITemplateProvider templateProvider

The object that declares the template. It is kept with the registration, so it must be durable.

Returns
Type Description
ITemplateRegistration
Exceptions
Type Condition
ArgumentNullException

templateProvider is null.

WithTemplateProvider<T>()

Sets the type that declares the template, which is then a static method.

Declaration
ITemplateRegistration WithTemplateProvider<T>() where T : ITemplateProvider
Returns
Type Description
ITemplateRegistration
Type Parameters
Name Description
T

The type that declares the template.

See Also