C# Class TinyTemplates.Template

Text templating engine in a file.
#field -> value of model property 'field' #{field} -> disambiguate, works with any expression #field.field -> traverse property of property ## -> # #|field (content) #. -> make items of enumerable property field into model wrt content #^field -> disambiguate when child and parent fields have same name (use parent) #$ -> the model itself
Datei anzeigen Open project: sprache/Sprache

Public Methods

Method Description
Execute ( object model ) : string
Execute ( object model, TextWriter output ) : void
Template ( string templateText ) : System

Method Details

Execute() public method

public Execute ( object model ) : string
model object
return string

Execute() public method

public Execute ( object model, TextWriter output ) : void
model object
output System.IO.TextWriter
return void

Template() public method

public Template ( string templateText ) : System
templateText string
return System