Add Method

HttpServer.dll

Add a template generator

Namespace:  HttpServer.Rendering
Assembly:  HttpServer (in HttpServer.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void Add(
	string fileExtension,
	TemplateGenerator generator
)
Visual Basic (Declaration)
Public Sub Add ( _
	fileExtension As String, _
	generator As TemplateGenerator _
)
Visual C++
public:
void Add(
	String^ fileExtension, 
	TemplateGenerator^ generator
)

Parameters

fileExtension
Type: System..::.String
File extension without the dot.
generator
Type: HttpServer.Rendering..::.TemplateGenerator
Generator to handle the extension

Examples

cache.Add("haml", new HamlGenerator());

Exceptions

ExceptionCondition
System..::.InvalidOperationExceptionIf the generator already exists.
System..::.ArgumentExceptionIf file extension is incorrect
System..::.ArgumentNullExceptionIf generator is not specified.

See Also