MustacheTemplateProvider

Namespace: Proffer.Templating.Mustache

A provider handles and compiles templates using N:Mustache.

public class MustacheTemplateProvider : Proffer.Templating.ITemplateProvider, Proffer.Templating.ITemplateProviderScope

Inheritance ObjectMustacheTemplateProvider
Implements ITemplateProvider, ITemplateProviderScope

Properties

MimeTypes

Gets the MIME types.

public ISet<string> MimeTypes { get; }

Property Value

ISet<String>

Extensions

Gets the extensions.

public ISet<string> Extensions { get; }

Property Value

ISet<String>

Constructors

MustacheTemplateProvider()

Initializes a new instance of the MustacheTemplateProvider class.

public MustacheTemplateProvider()

Methods

Compile(String)

Compiles the specified template content.

public ITemplate Compile(string templateContent)

Parameters

templateContent String
Content of the template.

Returns

ITemplate

        A new  compiled from the content.

CreateScope()

Creates a template provider scope.

public ITemplateProviderScope CreateScope()

Returns

ITemplateProviderScope

        A new templating provider scope.

RegisterPartial(String, String)

Registers a partial template with a name.

public void RegisterPartial(string name, string template)

Parameters

name String
The name.

template String
The template.

Exceptions

NotSupportedException