Class TemplatingEngine
Inheritance
System.Object
TemplatingEngine
Assembly: cs.temp.dll.dll
Syntax
public class TemplatingEngine : ITextTemplatingEngine
Methods
CompileTemplate(ParsedTemplate, String, ITextTemplatingEngineHost, TemplateSettings)
Declaration
public CompiledTemplate CompileTemplate(ParsedTemplate pt, string content, ITextTemplatingEngineHost host, TemplateSettings settings = null)
Parameters
Returns
CompileTemplate(String, ITextTemplatingEngineHost)
Declaration
public CompiledTemplate CompileTemplate(string content, ITextTemplatingEngineHost host)
Parameters
Type |
Name |
Description |
System.String |
content |
|
ITextTemplatingEngineHost |
host |
|
Returns
GenerateCodeFromMembers(CodeDomProvider, CodeGeneratorOptions, StringWriter, IEnumerable<CodeTypeMember>)
An implementation of CodeDomProvider.GenerateCodeFromMember that works on Mono.
Declaration
public static void GenerateCodeFromMembers(CodeDomProvider provider, CodeGeneratorOptions options, StringWriter sw, IEnumerable<CodeTypeMember> members)
Parameters
Type |
Name |
Description |
CodeDomProvider |
provider |
|
CodeGeneratorOptions |
options |
|
StringWriter |
sw |
|
System.Collections.Generic.IEnumerable<CodeTypeMember> |
members |
|
GenerateCompileUnit(ITextTemplatingEngineHost, String, ParsedTemplate, TemplateSettings)
Declaration
public static CodeCompileUnit GenerateCompileUnit(ITextTemplatingEngineHost host, string content, ParsedTemplate pt, TemplateSettings settings)
Parameters
Returns
Type |
Description |
CodeCompileUnit |
|
GenerateIndentedClassCode(CodeDomProvider, CodeTypeMember[])
Declaration
public static string GenerateIndentedClassCode(CodeDomProvider provider, params CodeTypeMember[] members)
Parameters
Type |
Name |
Description |
CodeDomProvider |
provider |
|
CodeTypeMember[] |
members |
|
Returns
Type |
Description |
System.String |
|
GenerateIndentedClassCode(CodeDomProvider, IEnumerable<CodeTypeMember>)
Declaration
public static string GenerateIndentedClassCode(CodeDomProvider provider, IEnumerable<CodeTypeMember> members)
Parameters
Type |
Name |
Description |
CodeDomProvider |
provider |
|
System.Collections.Generic.IEnumerable<CodeTypeMember> |
members |
|
Returns
Type |
Description |
System.String |
|
GetSettings(ITextTemplatingEngineHost, ParsedTemplate)
Declaration
public static TemplateSettings GetSettings(ITextTemplatingEngineHost host, ParsedTemplate pt)
Parameters
Type |
Name |
Description |
ITextTemplatingEngineHost |
host |
|
ParsedTemplate |
pt |
|
Returns
IndentSnippetText(CodeDomProvider, String, String)
Declaration
public static string IndentSnippetText(CodeDomProvider provider, string text, string indent)
Parameters
Type |
Name |
Description |
CodeDomProvider |
provider |
|
System.String |
text |
|
System.String |
indent |
|
Returns
Type |
Description |
System.String |
|
IndentSnippetText(String, String)
Declaration
public static string IndentSnippetText(string text, string indent)
Parameters
Type |
Name |
Description |
System.String |
text |
|
System.String |
indent |
|
Returns
Type |
Description |
System.String |
|
PreprocessTemplate(ParsedTemplate, String, ITextTemplatingEngineHost, String, String, out String, out String[], TemplateSettings)
Declaration
public string PreprocessTemplate(ParsedTemplate pt, string content, ITextTemplatingEngineHost host, string className, string classNamespace, out string language, out string[] references, TemplateSettings settings = null)
Parameters
Type |
Name |
Description |
ParsedTemplate |
pt |
|
System.String |
content |
|
ITextTemplatingEngineHost |
host |
|
System.String |
className |
|
System.String |
classNamespace |
|
System.String |
language |
|
System.String[] |
references |
|
TemplateSettings |
settings |
|
Returns
Type |
Description |
System.String |
|
PreprocessTemplate(String, ITextTemplatingEngineHost, String, String, out String, out String[])
Declaration
public string PreprocessTemplate(string content, ITextTemplatingEngineHost host, string className, string classNamespace, out string language, out string[] references)
Parameters
Type |
Name |
Description |
System.String |
content |
|
ITextTemplatingEngineHost |
host |
|
System.String |
className |
|
System.String |
classNamespace |
|
System.String |
language |
|
System.String[] |
references |
|
Returns
Type |
Description |
System.String |
|
ProcessTemplate(String, ITextTemplatingEngineHost)
Declaration
public string ProcessTemplate(string content, ITextTemplatingEngineHost host)
Parameters
Type |
Name |
Description |
System.String |
content |
|
ITextTemplatingEngineHost |
host |
|
Returns
Type |
Description |
System.String |
|