C# Class EU4.Stats.Web.Templater

The Templater provides a thread safe mechanism for rendering objects into html, caching the template, and updating the template whenever the template changes. The current implementation uses mutual exclusive locking. The reason for this is two-fold. One, it is easy to get threading right, and secondly, generating the resulting html isn't computationally intensive so the lock will only be acquired for a few moments.
Inheritance: ITemplate
Afficher le fichier Open project: nickbabcock/EU4.Savegame Class Usage Examples

Méthodes publiques

Méthode Description
Render ( StatsModel obj ) : string
Templater ( string filepath ) : RazorEngine.Templating

Private Methods

Méthode Description
watcher_Changed ( object sender, FileSystemEventArgs e ) : void

Method Details

Render() public méthode

public Render ( StatsModel obj ) : string
obj StatsModel
Résultat string

Templater() public méthode

public Templater ( string filepath ) : RazorEngine.Templating
filepath string
Résultat RazorEngine.Templating