C# 클래스 Microsoft.DocAsCode.Build.Engine.Template

파일 보기 프로젝트 열기: dotnet/docfx

공개 메소드들

메소드 설명
GetOptions ( object model ) : TransformModelOptions

exports.getOptions = function (model) { return { bookmarks : { uid1: "bookmark1" }, isShared: true } }

Template ( string name, DocumentBuildContext context, TemplateRendererResource templateResource, TemplatePreprocessorResource scriptResource, ResourceCollection resourceCollection, int maxParallelism ) : System
Transform ( object model ) : string

Transform from view model to the final result using template Supported template languages are mustache and liquid

TransformModel ( object model ) : object

Transform from raw model to view model TODO: refactor to merge model and attrs into one input model

비공개 메소드들

메소드 설명
CreatePreprocessor ( ResourceCollection resourceCollection, TemplatePreprocessorResource scriptResource, DocumentBuildContext context ) : ITemplatePreprocessor
CreateRenderer ( ResourceCollection resourceCollection, TemplateRendererResource templateResource ) : ITemplateRenderer
ExtractDependentResources ( string templateName ) : IEnumerable

Dependent files are defined in following syntax in Mustache template leveraging Mustache Comments {{! include('file') }} file path can be wrapped by quote ' or double quote " or none

GetRelativeResourceKey ( string templateName, string relativePath ) : string
GetTemplateInfo ( string templateName ) : TemplateInfo

메소드 상세

GetOptions() 공개 메소드

exports.getOptions = function (model) { return { bookmarks : { uid1: "bookmark1" }, isShared: true } }
public GetOptions ( object model ) : TransformModelOptions
model object
리턴 TransformModelOptions

Template() 공개 메소드

public Template ( string name, DocumentBuildContext context, TemplateRendererResource templateResource, TemplatePreprocessorResource scriptResource, ResourceCollection resourceCollection, int maxParallelism ) : System
name string
context DocumentBuildContext
templateResource TemplateRendererResource
scriptResource TemplatePreprocessorResource
resourceCollection ResourceCollection
maxParallelism int
리턴 System

Transform() 공개 메소드

Transform from view model to the final result using template Supported template languages are mustache and liquid
public Transform ( object model ) : string
model object The input view model
리턴 string

TransformModel() 공개 메소드

Transform from raw model to view model TODO: refactor to merge model and attrs into one input model
public TransformModel ( object model ) : object
model object The raw model
리턴 object