MustacheTemplate

Namespace: Proffer.Templating.Mustache

A template reference can be executed on a specific context using N:Mustache.

public class MustacheTemplate : Proffer.Templating.ITemplate

Inheritance ObjectMustacheTemplate
Implements ITemplate

Constructors

MustacheTemplate(String)

Initializes a new instance of the MustacheTemplate class.

public MustacheTemplate(string templateContent)

Parameters

templateContent String
Content of the template.

Methods

Apply(Object)

Applies the specified context on the template.

public string Apply(object context)

Parameters

context Object
The context.

Returns

String

        The templated result.

Exceptions

Proffer.Templating.InvalidContextException

Apply(Object, IFormatProvider)

Applies the specified context on the template with format provider.

public string Apply(object context, IFormatProvider formatProvider)

Parameters

context Object
The context.

formatProvider IFormatProvider
The format provider.

Returns

String

        The templated result.

Exceptions

Proffer.Templating.InvalidContextException