C# 클래스 Stubble.Core.Context

Represents the context for a template
파일 보기 프로젝트 열기: StubbleOrg/Stubble 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetValueFromRegistry object
TryEnumerationConversionIfRequired object

공개 메소드들

메소드 설명
Context ( object view, Registry registry, Context parentContext, RenderSettings settings ) : System.Reflection

Initializes a new instance of the Context class.

Context ( object view, Registry registry, RenderSettings settings ) : System.Reflection

Initializes a new instance of the Context class.

IsTruthyValue ( object value ) : bool

Checks if the passed value is Truthy

Lookup ( string name ) : object

Looks up a value by name from the context

Push ( object newView ) : Context

Returns a new Context with the given view and it's parent set as the current context

비공개 메소드들

메소드 설명
GetValueFromRegistry ( object value, string key ) : object

Gets a value from the registry using the initalized value getters

TryEnumerationConversionIfRequired ( object value ) : object

Tries to convert an object into an Enumeration if possible

메소드 상세

Context() 공개 메소드

Initializes a new instance of the Context class.
public Context ( object view, Registry registry, Context parentContext, RenderSettings settings ) : System.Reflection
view object The data view to create the context with
registry Stubble.Core.Classes.Registry A reference to the a registry instance
parentContext Context The parent context for the new context
settings Stubble.Core.Classes.RenderSettings The render settings
리턴 System.Reflection

Context() 공개 메소드

Initializes a new instance of the Context class.
public Context ( object view, Registry registry, RenderSettings settings ) : System.Reflection
view object The data view to create the context with
registry Stubble.Core.Classes.Registry A reference to the a registry instance
settings Stubble.Core.Classes.RenderSettings The render settings
리턴 System.Reflection

IsTruthyValue() 공개 메소드

Checks if the passed value is Truthy
public IsTruthyValue ( object value ) : bool
value object The value to check
리턴 bool

Lookup() 공개 메소드

Looks up a value by name from the context
If ThrowOnDataMiss set then thrown on value not found
public Lookup ( string name ) : object
name string The name of the value to lookup
리턴 object

Push() 공개 메소드

Returns a new Context with the given view and it's parent set as the current context
public Push ( object newView ) : Context
newView object The data view to create the new context with
리턴 Context