C# Class mustache.TagDefinition

Defines the attributes of a custom tag.
Datei anzeigen Open project: Zocdoc/mustache-sharp Class Usage Examples

Private Properties

Property Type Description
TagDefinition System

Public Methods

Method Description
ConsolidateWriter ( TextWriter writer, object>.Dictionary arguments ) : string

Consolidates the text in the given writer to a string, using the given arguments as necessary.

GetChildContext ( TextWriter writer, KeyScope scope, object>.Dictionary arguments ) : IEnumerable

Gets the context to use when building the inner text of the tag.

GetText ( TextWriter writer, object>.Dictionary arguments ) : void

Applies additional formatting to the inner text of the tag.

ShouldCreateSecondaryGroup ( TagDefinition definition ) : bool

Requests which generator group to associate the given tag type.

ShouldGeneratePrimaryGroup ( object>.Dictionary arguments ) : bool

Gets whether the group with the given name should have text generated for them.

Protected Methods

Method Description
GetChildTags ( ) : IEnumerable

Specifies which tags are scoped under the current tag.

GetClosingTags ( ) : IEnumerable
GetHasContent ( ) : bool

Gets whether tag has content.

GetIsContextSensitive ( ) : bool

Gets whether a tag is limited to the parent tag's context.

GetParameters ( ) : IEnumerable

Specifies which parameters are passed to the tag.

TagDefinition ( string tagName ) : System

Initializes a new instance of a TagDefinition.

Private Methods

Method Description
TagDefinition ( string tagName, bool isBuiltIn ) : System

Initializes a new instance of a TagDefinition.

Method Details

ConsolidateWriter() public method

Consolidates the text in the given writer to a string, using the given arguments as necessary.
public ConsolidateWriter ( TextWriter writer, object>.Dictionary arguments ) : string
writer System.IO.TextWriter The writer containing the text to consolidate.
arguments object>.Dictionary The arguments passed to the tag.
return string

GetChildContext() public method

Gets the context to use when building the inner text of the tag.
public GetChildContext ( TextWriter writer, KeyScope scope, object>.Dictionary arguments ) : IEnumerable
writer System.IO.TextWriter The text writer passed
scope KeyScope The current scope.
arguments object>.Dictionary The arguments passed to the tag.
return IEnumerable

GetChildTags() protected method

Specifies which tags are scoped under the current tag.
protected GetChildTags ( ) : IEnumerable
return IEnumerable

GetClosingTags() protected method

protected GetClosingTags ( ) : IEnumerable
return IEnumerable

GetHasContent() protected abstract method

Gets whether tag has content.
protected abstract GetHasContent ( ) : bool
return bool

GetIsContextSensitive() protected method

Gets whether a tag is limited to the parent tag's context.
protected GetIsContextSensitive ( ) : bool
return bool

GetParameters() protected method

Specifies which parameters are passed to the tag.
protected GetParameters ( ) : IEnumerable
return IEnumerable

GetText() public method

Applies additional formatting to the inner text of the tag.
public GetText ( TextWriter writer, object>.Dictionary arguments ) : void
writer System.IO.TextWriter The text writer to write to.
arguments object>.Dictionary The arguments passed to the tag.
return void

ShouldCreateSecondaryGroup() public method

Requests which generator group to associate the given tag type.
public ShouldCreateSecondaryGroup ( TagDefinition definition ) : bool
definition TagDefinition The child tag definition being grouped.
return bool

ShouldGeneratePrimaryGroup() public method

Gets whether the group with the given name should have text generated for them.
public ShouldGeneratePrimaryGroup ( object>.Dictionary arguments ) : bool
arguments object>.Dictionary The arguments passed to the tag.
return bool

TagDefinition() protected method

Initializes a new instance of a TagDefinition.
The name of the tag is null or blank.
protected TagDefinition ( string tagName ) : System
tagName string The name of the tag.
return System