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
Mostrar archivo Open project: nickbabcock/EU4.Savegame Class Usage Examples

Public Methods

Method Description
Render ( StatsModel obj ) : string
Templater ( string filepath ) : RazorEngine.Templating

Private Methods

Method Description
watcher_Changed ( object sender, FileSystemEventArgs e ) : void

Method Details

Render() public method

public Render ( StatsModel obj ) : string
obj StatsModel
return string

Templater() public method

public Templater ( string filepath ) : RazorEngine.Templating
filepath string
return RazorEngine.Templating