C# 클래스 SharpTAL.TemplateCache.AbstractTemplateCache

상속: ITemplateCache
파일 보기 프로젝트 열기: lck/SharpTAL

공개 메소드들

메소드 설명
CompileTemplate ( string templateBody, Type>.Dictionary globalsTypes, List referencedAssemblies ) : TemplateInfo

Compile template to ensure that the compiled assembly is already in cache when RenderTemplate is called for the first time. For precompiling, the actual values of globals are not required, just the names and types of the global variables.

보호된 메소드들

메소드 설명
ComputeTemplateKey ( TemplateInfo ti ) : string

Returns a unique key that represent the template in the template cache. The template key is computed from the following parts: Template body hash, Global types hash, Imported templates hash, Referenced assemblies hash

GenerateTemplateProgram ( string templateBody, Type>.Dictionary globalsTypes, List referencedAssemblies ) : TemplateInfo

Generate template program from template body and generate the TemplateKey

GetTemplateGeneratorVersion ( Assembly assembly, TemplateInfo ti ) : string

Try to find the template source generator version

GetTemplateRenderMethod ( Assembly assembly, TemplateInfo ti ) : MethodInfo

Try to find the render method in assembly

메소드 상세

CompileTemplate() 공개 추상적인 메소드

Compile template to ensure that the compiled assembly is already in cache when RenderTemplate is called for the first time. For precompiling, the actual values of globals are not required, just the names and types of the global variables.
public abstract CompileTemplate ( string templateBody, Type>.Dictionary globalsTypes, List referencedAssemblies ) : TemplateInfo
templateBody string The template body
globalsTypes Type>.Dictionary Dictionary of types of global variables
referencedAssemblies List List of referenced assemblies
리턴 TemplateInfo

ComputeTemplateKey() 보호된 정적인 메소드

Returns a unique key that represent the template in the template cache. The template key is computed from the following parts: Template body hash, Global types hash, Imported templates hash, Referenced assemblies hash
protected static ComputeTemplateKey ( TemplateInfo ti ) : string
ti TemplateInfo Template info
리턴 string

GenerateTemplateProgram() 보호된 정적인 메소드

Generate template program from template body and generate the TemplateKey
protected static GenerateTemplateProgram ( string templateBody, Type>.Dictionary globalsTypes, List referencedAssemblies ) : TemplateInfo
templateBody string
globalsTypes Type>.Dictionary
referencedAssemblies List
리턴 TemplateInfo

GetTemplateGeneratorVersion() 보호된 정적인 메소드

Try to find the template source generator version
protected static GetTemplateGeneratorVersion ( Assembly assembly, TemplateInfo ti ) : string
assembly System.Reflection.Assembly
ti TemplateInfo
리턴 string

GetTemplateRenderMethod() 보호된 정적인 메소드

Try to find the render method in assembly
protected static GetTemplateRenderMethod ( Assembly assembly, TemplateInfo ti ) : MethodInfo
assembly System.Reflection.Assembly
ti TemplateInfo
리턴 System.Reflection.MethodInfo