C# Класс SharpTAL.TemplateCache.AbstractTemplateCache

Наследование: ITemplateCache
Показать файл Открыть проект

Открытые методы

Метод Описание
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