C# Class RazorTemplates.Core.TemplateBase

Represents a base class for generated templates.
Afficher le fichier Open project: volkovku/RazorTemplates

Méthodes publiques

Méthode Description
Execute ( ) : void

A method which implemets by Razor engine. Produces sequance like: WriteLiteral("Hello "); Write(Model.Name); WriteLiteral("!");

Render ( object model ) : string

Renders specified model.

Méthodes protégées

Méthode Description
Write ( object value ) : void

Writes a string representation of specified object.

Write ( string value ) : void

Writes a string.

WriteAttribute ( string attribute, PositionTagged prefix, PositionTagged suffix ) : void

Razor 2.0 Writes attribute in situations like <img src="@Model">.

WriteLiteral ( string value ) : void

Writes specified string.

Method Details

Execute() public abstract méthode

A method which implemets by Razor engine. Produces sequance like: WriteLiteral("Hello "); Write(Model.Name); WriteLiteral("!");
public abstract Execute ( ) : void
Résultat void

Render() public méthode

Renders specified model.
public Render ( object model ) : string
model object
Résultat string

Write() protected méthode

Writes a string representation of specified object.
protected Write ( object value ) : void
value object
Résultat void

Write() protected méthode

Writes a string.
protected Write ( string value ) : void
value string
Résultat void

WriteAttribute() protected méthode

Razor 2.0 Writes attribute in situations like <img src="@Model">.
protected WriteAttribute ( string attribute, PositionTagged prefix, PositionTagged suffix ) : void
attribute string
prefix PositionTagged
suffix PositionTagged
Résultat void

WriteLiteral() protected méthode

Writes specified string.
protected WriteLiteral ( string value ) : void
value string
Résultat void