C# Class TemplNET.Templ

Main class for producing Templ.NET documents
Show file Open project: CPonty/templ-dot-net

Public Properties

Property Type Description
ActiveModules List
Debugger TemplDebugger

Private Properties

Property Type Description
Templ System.Collections.Generic

Public Methods

Method Description
Build ( object model, bool debug = TemplConst.Debug, HandleFailAction modelEntryFailAction = HandleFailAction.exception ) : Templ

Builds the document, using the provided model. ActiveModules are applied to the document in sequence. Enabling debug stores intermediate states after each module.

Load ( Stream stream, bool useDefaultModules = true ) : Templ

Initialises a document template, based on the supplied document data stream

Load ( TemplDoc document, bool useDefaultModules = true ) : Templ

Initialises a document template, based on the supplied document object

Load ( byte templateFile, bool useDefaultModules = true ) : Templ

Initialises a document template, based on the supplied document data

Load ( string templatePath, bool useDefaultModules = true ) : Templ

Initialises a document template, based on the supplied document file

SaveAs ( string fileName ) : Templ

Saves the document to file. Run Build first

Private Methods

Method Description
Templ ( ) : System.Collections.Generic

Method Details

Build() public method

Builds the document, using the provided model. ActiveModules are applied to the document in sequence. Enabling debug stores intermediate states after each module.
public Build ( object model, bool debug = TemplConst.Debug, HandleFailAction modelEntryFailAction = HandleFailAction.exception ) : Templ
model object
debug bool
modelEntryFailAction HandleFailAction
return Templ

Load() public static method

Initialises a document template, based on the supplied document data stream
public static Load ( Stream stream, bool useDefaultModules = true ) : Templ
stream System.IO.Stream
useDefaultModules bool
return Templ

Load() public static method

Initialises a document template, based on the supplied document object
public static Load ( TemplDoc document, bool useDefaultModules = true ) : Templ
document TemplDoc
useDefaultModules bool
return Templ

Load() public static method

Initialises a document template, based on the supplied document data
public static Load ( byte templateFile, bool useDefaultModules = true ) : Templ
templateFile byte
useDefaultModules bool
return Templ

Load() public static method

Initialises a document template, based on the supplied document file
public static Load ( string templatePath, bool useDefaultModules = true ) : Templ
templatePath string
useDefaultModules bool
return Templ

SaveAs() public method

Saves the document to file. Run Build first
public SaveAs ( string fileName ) : Templ
fileName string
return Templ

Property Details

ActiveModules public property

Active Modules (text, picture, table etc.). Applied to the document at Build time.
public List ActiveModules
return List

Debugger public property

Built-in debugger. Generates a .zip file of debug information at Build time.
public TemplDebugger,TemplNET Debugger
return TemplDebugger