MetalamaAPI documentationAspect APIMetalama.​Framework.​AspectsmetaInvoke­Template
Open sandboxFocus

meta.InvokeTemplate Method

InvokeTemplate(String, TemplateProvider, Object)

Calls another template method. This overload accepts a TemplateProvider.

Declaration
public static void InvokeTemplate(string templateName, TemplateProvider templateProvider, object args = null)
Parameters
Type Name Description
System.String templateName

The name of the called template method.

TemplateProvider templateProvider

A TemplateProvider.

System.Object args

Compile-time template arguments that will be passed to the template.

InvokeTemplate(String, ITemplateProvider, Object)

Calls another template method. This overload accepts an ITemplateProvider.

Declaration
public static void InvokeTemplate(string templateName, ITemplateProvider templateProvider = null, object args = null)
Parameters
Type Name Description
System.String templateName

The name of the called template method.

ITemplateProvider templateProvider

An optional TemplateProvider, or langword_csharp_default for the current template provider (usually the current aspect).

System.Object args

Compile-time template arguments that will be passed to the template.

InvokeTemplate(TemplateInvocation, Object)

Calls another template method.

Declaration
public static void InvokeTemplate(TemplateInvocation templateInvocation, object args = null)
Parameters
Type Name Description
TemplateInvocation templateInvocation

Object that contains information about the called template method.

System.Object args

Compile-time template arguments that will be passed to the template, in addition to arguments from templateInvocation.