C# Class TemplNET.TemplModule

Represents a code module for the document build process
Datei anzeigen Open project: CPonty/templ-dot-net

Public Properties

Property Type Description
CustomHandler Func
Name string
Regexes ISet
Statistics TemplModuleStatistics
Used bool

Public Methods

Method Description
Build ( DocX doc, object model, HandleFailAction modelEntryFailAction ) : void

Applies all changes to the document. Templ.Build automatically executes it for all Templ.ActiveModules.

TemplModule ( string name, string prefix ) : System

Creates a code module for the document build process

Protected Methods

Method Description
AddPrefix ( string prefix ) : TemplModule

Given a prefix, add a placeholder to Regexes. These are used to find Matches in the document.

Method Details

AddPrefix() protected method

Given a prefix, add a placeholder to Regexes. These are used to find Matches in the document.
protected AddPrefix ( string prefix ) : TemplModule
prefix string
return TemplModule

Build() public abstract method

Applies all changes to the document. Templ.Build automatically executes it for all Templ.ActiveModules.
public abstract Build ( DocX doc, object model, HandleFailAction modelEntryFailAction ) : void
doc Novacode.DocX
model object
modelEntryFailAction HandleFailAction
return void

TemplModule() public method

Creates a code module for the document build process
public TemplModule ( string name, string prefix ) : System
name string Module name
prefix string Placeholder prefix when searching for matches
return System

Property Details

CustomHandler public_oe property

An optional second handler function. Assignable per module instance at runtime.
public Func CustomHandler
return Func

Name public_oe property

Module instance name. Used as an identifier in the debugger.
public string Name
return string

Regexes public_oe property

The set of placeholder regexes used to find Matches in the document
public ISet Regexes
return ISet

Statistics public_oe property

Named metadata values. Included in the Module meta-report when building in debug mode.
public TemplModuleStatistics,TemplNET Statistics
return TemplModuleStatistics

Used public_oe property

Flag set if any Match instances were found during the Module's build process
public bool Used
return bool