Class TextJSTemplateCompiler
Compiles templates based of text files that use js language syntax, compiles config to inline function
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<CompileUnit>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Templatization
Assembly: Azos.dll
Syntax
[Obsolete("This compiler is for legacy support only. Plan to convert to newer LJSCompiler syntax")]
public class TextJSTemplateCompiler : TemplateCompiler, IDisposable, IConfigurable, IEnumerable<CompileUnit>, IEnumerable
Examples
argument[0] - root container 'id' or 'node' argument[1] - context for variable evaluation
function() {
/*** #preprocessor_directive#
{
tag-name="inner text"
property-name="property value"
evaluted-property-name="@prop@ evaluated property"
on-event="function() { click(); }"
}
***/
}
Constructors
TextJSTemplateCompiler()
Declaration
public TextJSTemplateCompiler()
TextJSTemplateCompiler(ITemplateSource<String>[])
Declaration
public TextJSTemplateCompiler(params ITemplateSource<string>[] sources)
Parameters
Type | Name | Description |
---|---|---|
ITemplateSource<System.String>[] | sources |
TextJSTemplateCompiler(IEnumerable<ITemplateSource<String>>)
Declaration
public TextJSTemplateCompiler(IEnumerable<ITemplateSource<string>> sources)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ITemplateSource<System.String>> | sources |
Fields
CONFIG_DOM_GENERATOR_SECT
Declaration
public const string CONFIG_DOM_GENERATOR_SECT = "dom-gen"
Field Value
Type | Description |
---|---|
System.String |
DOM_GENERATOR_SKIP_PRAGMA
Declaration
public const string DOM_GENERATOR_SKIP_PRAGMA = " #skip#"
Field Value
Type | Description |
---|---|
System.String |
Properties
DomGenConfig
Declaration
[Config("$dom-gen")]
public string DomGenConfig { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DOMGenerator
Declaration
[Config("dom-gen")]
public DOMGenerator DOMGenerator { get; set; }
Property Value
Type | Description |
---|---|
DOMGenerator |
LanguageName
Declaration
public override string LanguageName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LanguageSourceFileExtension
Declaration
public override string LanguageSourceFileExtension { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
DoCompileCode()
Declaration
protected override void DoCompileCode()
Overrides
DoCompileTemplateSource(CompileUnit)
Declaration
protected override void DoCompileTemplateSource(CompileUnit unit)
Parameters
Type | Name | Description |
---|---|---|
CompileUnit | unit |
Overrides
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable