C# Class GnomeServer.TemplateHelper

Show file Open project: Rychard/GnomeServer

Public Methods

Method Description
GetTemplate ( String template ) : String

Gets the full content of a template.

GetTokenReplacements ( String title, List handlers, String body ) : String>.Dictionary

Gets a dictionary that contains standard replacement tokens using the specified values.

GetWebRoot ( ) : String

Gets the full path of the directory that is .

PopulateTemplate ( String template, String>.Dictionary tokenReplacements ) : String

Retrieves the template with the specified name, and returns the contents of the template after replacing instances of the dictionary keys from tokenReplacements with their coorresponding values.

The value of template should not include the file extension.

Method Details

GetTemplate() public static method

Gets the full content of a template.
public static GetTemplate ( String template ) : String
template String
return String

GetTokenReplacements() public static method

Gets a dictionary that contains standard replacement tokens using the specified values.
public static GetTokenReplacements ( String title, List handlers, String body ) : String>.Dictionary
title String
handlers List
body String
return String>.Dictionary

GetWebRoot() public static method

Gets the full path of the directory that is .
public static GetWebRoot ( ) : String
return String

PopulateTemplate() public static method

Retrieves the template with the specified name, and returns the contents of the template after replacing instances of the dictionary keys from tokenReplacements with their coorresponding values.
The value of template should not include the file extension.
public static PopulateTemplate ( String template, String>.Dictionary tokenReplacements ) : String
template String The name of the template to populate.
tokenReplacements String>.Dictionary A dictionary containing key/value pairs for replacement.
return String