C# Class GnomeServer.TemplateHelper

Afficher le fichier Open project: Rychard/GnomeServer

Méthodes publiques

Méthode 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 méthode

Gets the full content of a template.
public static GetTemplate ( String template ) : String
template String
Résultat String

GetTokenReplacements() public static méthode

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
Résultat String>.Dictionary

GetWebRoot() public static méthode

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

PopulateTemplate() public static méthode

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.
Résultat String