C# 클래스 Stubble.Core.StubbleRenderer

Represents the core StubbleRenderer which renders Mustache templates
상속: IStubbleRenderer
파일 보기 프로젝트 열기: StubbleOrg/Stubble

Private Properties

프로퍼티 타입 설명
StubbleRenderer System.Collections.Generic

공개 메소드들

메소드 설명
CacheTemplate ( string template ) : void

Parses a template and adds the result to the writer cache.

CacheTemplate ( string template, Tags tags ) : void

Parses a template with given tags and adds the result to the writer cache.

CacheTemplate ( string template, string tags ) : void

Parses a template with given tags and adds the result to the writer cache.

ClearCache ( ) : void

Clears all cached templates in the Writer.

Parse ( string template ) : IList

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string)

Parse ( string template, Tags tags ) : IList

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string,Tags)

Parse ( string template, string tags ) : IList

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string,string)

Render ( string template, object view ) : string

Renders the template with the given view using the writer.

Render ( string template, object view, string>.IDictionary partials ) : string

Renders the template with the given view and partials using the writer.

Render ( string template, object view, string>.IDictionary partials, RenderSettings settings ) : string

Renders the template with the given view and partials using the writer and the given Render Settings

Render ( string template, object view, RenderSettings settings ) : string

Renders the template with the given view using the writer and the given render settings.

StubbleRenderer ( ) : System.Collections.Generic

Initializes a new instance of the StubbleRenderer class with a default Registry

비공개 메소드들

메소드 설명
StubbleRenderer ( Registry registry ) : System.Collections.Generic

Initializes a new instance of the StubbleRenderer class with a passed Registry

메소드 상세

CacheTemplate() 공개 메소드

Parses a template and adds the result to the writer cache.
public CacheTemplate ( string template ) : void
template string The mustache teplate to parse
리턴 void

CacheTemplate() 공개 메소드

Parses a template with given tags and adds the result to the writer cache.
public CacheTemplate ( string template, Tags tags ) : void
template string The mustache teplate to parse
tags Stubble.Core.Classes.Tags The set of tags to use for parsing
리턴 void

CacheTemplate() 공개 메소드

Parses a template with given tags and adds the result to the writer cache.
public CacheTemplate ( string template, string tags ) : void
template string The mustache teplate to parse
tags string A tag string split by a space e.g. {{ }}
리턴 void

ClearCache() 공개 메소드

Clears all cached templates in the Writer.
public ClearCache ( ) : void
리턴 void

Parse() 공개 메소드

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string)
public Parse ( string template ) : IList
template string The mustache teplate to parse
리턴 IList

Parse() 공개 메소드

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string,Tags)
public Parse ( string template, Tags tags ) : IList
template string The mustache teplate to parse
tags Stubble.Core.Classes.Tags The set of tags to use for parsing
리턴 IList

Parse() 공개 메소드

Parses and caches the given template in the writer and returns the list of tokens it contains. Doing this ahead of time avoids the need to parse templates on the fly as they are rendered. If you don't need the result CacheTemplate(string,string)
public Parse ( string template, string tags ) : IList
template string The mustache teplate to parse
tags string A tag string split by a space e.g. {{ }}
리턴 IList

Render() 공개 메소드

Renders the template with the given view using the writer.
public Render ( string template, object view ) : string
template string The mustache teplate to render
view object The data to use for rendering
리턴 string

Render() 공개 메소드

Renders the template with the given view and partials using the writer.
public Render ( string template, object view, string>.IDictionary partials ) : string
template string The mustache teplate to render
view object The data to use for rendering
partials string>.IDictionary A hash of Partials
리턴 string

Render() 공개 메소드

Renders the template with the given view and partials using the writer and the given Render Settings
public Render ( string template, object view, string>.IDictionary partials, RenderSettings settings ) : string
template string The mustache teplate to render
view object The data to use for rendering
partials string>.IDictionary A hash of Partials
settings Stubble.Core.Classes.RenderSettings Any settings you wish to override the defaults with
리턴 string

Render() 공개 메소드

Renders the template with the given view using the writer and the given render settings.
public Render ( string template, object view, RenderSettings settings ) : string
template string The mustache teplate to render
view object The data to use for rendering
settings Stubble.Core.Classes.RenderSettings Any settings you wish to override the defaults with
리턴 string

StubbleRenderer() 공개 메소드

Initializes a new instance of the StubbleRenderer class with a default Registry
public StubbleRenderer ( ) : System.Collections.Generic
리턴 System.Collections.Generic