sebastienros/fluid#578 Implement tag names #579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've implemented support to retrieve tag names from the statement list as discussed in #578.
ExtensibilityTests
have been amended; let me know if I've missed anything obvious.In terms of design, I opted to add another interface
IHasTagName
for a few reasons:EmptyBlockStatement
,EmptyTagStatement
,ParserBlockStatement
,ParserTagStatement
) now have a shared interface typeinternal
and this hasn't changed visibilityStatement
is used throughout the codebase and wasn't an appropriate change point.The change means that I can do what I needed to do quite simply, basically
template.Statements.Where(x => x.GetType() == typeof(IHasTagName)).First(y => y.TagName == "what i'm looking for")
I've also added an interface
IHasValue
for retrieving the interface value from a statement. This Value will hold an individual value passed in, or in the case of usingArgumentsList
you'll get anList
ofFilterArgument
.If you need any amendments let me know.