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
Afficher le fichier Open project: sprache/Sprache

Méthodes publiques

Méthode Description
Execute ( object model ) : string
Execute ( object model, TextWriter output ) : void
Template ( string templateText ) : System

Method Details

Execute() public méthode

public Execute ( object model ) : string
model object
Résultat string

Execute() public méthode

public Execute ( object model, TextWriter output ) : void
model object
output System.IO.TextWriter
Résultat void

Template() public méthode

public Template ( string templateText ) : System
templateText string
Résultat System