C# Class mustache.TagDefinition

Defines the attributes of a custom tag.
Afficher le fichier Open project: Zocdoc/mustache-sharp Class Usage Examples

Private Properties

Свойство Type Description
TagDefinition System

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
TagDefinition ( string tagName, bool isBuiltIn ) : System

Initializes a new instance of a TagDefinition.

Method Details

ConsolidateWriter() public méthode

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.
Résultat string

GetChildContext() public méthode

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.
Résultat IEnumerable

GetChildTags() protected méthode

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

GetClosingTags() protected méthode

protected GetClosingTags ( ) : IEnumerable
Résultat IEnumerable

GetHasContent() protected abstract méthode

Gets whether tag has content.
protected abstract GetHasContent ( ) : bool
Résultat bool

GetIsContextSensitive() protected méthode

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

GetParameters() protected méthode

Specifies which parameters are passed to the tag.
protected GetParameters ( ) : IEnumerable
Résultat IEnumerable

GetText() public méthode

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.
Résultat void

ShouldCreateSecondaryGroup() public méthode

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

ShouldGeneratePrimaryGroup() public méthode

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.
Résultat bool

TagDefinition() protected méthode

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.
Résultat System