C# 클래스 Scriban.Template

Entry point class to parse templates and render them.
파일 보기 프로젝트 열기: lunet-io/scriban 1 사용 예제들

공개 메소드들

메소드 설명
Parse ( string text, string sourceFilePath = null, ParserOptions options = null ) : Template

Parses the specified scripting text into a Template .

Render ( object model = null ) : string

Renders this template using the specified object model.

Render ( TemplateContext context ) : void

Renders this template using the specified context. See remarks.

When using this method, the result of rendering this page is output to TemplateContext.Output

비공개 메소드들

메소드 설명
ParseInternal ( string text, string sourceFilePath ) : void
Template ( ParserOptions options, string sourceFilePath ) : System

메소드 상세

Parse() 공개 정적인 메소드

Parses the specified scripting text into a Template .
public static Parse ( string text, string sourceFilePath = null, ParserOptions options = null ) : Template
text string The scripting text.
sourceFilePath string The source file path. Optional, used for better error reporting if the source file has a location on the disk
options Scriban.Parsing.ParserOptions The templating parsing options.
리턴 Template

Render() 공개 메소드

Renders this template using the specified object model.
public Render ( object model = null ) : string
model object The object model.
리턴 string

Render() 공개 메소드

Renders this template using the specified context. See remarks.
When using this method, the result of rendering this page is output to TemplateContext.Output
If context is null If the template . Check the property for more details
public Render ( TemplateContext context ) : void
context TemplateContext The template context.
리턴 void