aspnetcore/test/Microsoft.AspNetCore.Blazor.../TestFiles/RuntimeCodeGenerationTest
Ryan Nowak c97cb8c18b Add support for Razor templates
Adds support for Razor templates and RenderFragment<T>.

Razor templates are a little-known Razor feature that looks like:
```
@<tag>....<tag>
```

It's so little known that it's not even covered in our docs, but it's
been around for many many years. This features hasn't been implemented
until now for Blazor, and this feature brings it back as a build
building block for templated components (more to come).

In Blazor land a template like:
```
@{ RenderFragment<Person> template = @<div>@item.Name</div>; }
```

complies to code like:
```
RenderFragment<Person> template = (__builder, item) =>
{
    __builder.OpenElement(...);
    ...
    __builder.CloseElement(...);
}
```

Since the declaration always has a generic type parameter inside, it
needs to be in a context where the type is known.. ie: not with `var`.

See tests for ways to consume templates.

NOTE: There are the following caveats for templates
- Templates require a single root element.
- Templates don't work in the `@functions { }` block

These limitations are baked into the core of Razor and will take a while
for us to address (v3.0).
2018-08-31 19:10:42 -07:00
..
AsyncEventHandler_OnElement_ActionEventArgs_Lambda
AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup
AsyncEventHandler_OnElement_Action_Lambda
AsyncEventHandler_OnElement_Action_MethodGroup
BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties
BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties
BindToComponent_SpecifiesValue_WithMatchingProperties
BindToComponent_SpecifiesValue_WithoutMatchingProperties
BindToComponent_TypeChecked_WithMatchingProperties
BindToElementFallback_WithFormat_WritesAttributes
BindToElementFallback_WritesAttributes
BindToElementWithSuffix_WritesAttributes
BindToElement_WritesAttributes
BuiltIn_BindToInputCheckbox_WritesAttributes
BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes
BuiltIn_BindToInputText_WithFormat_WritesAttributes
BuiltIn_BindToInputText_WritesAttributes
BuiltIn_BindToInputWithoutType_WritesAttributes
ChildComponent_Simple
ChildComponent_WithChildContent Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
ChildComponent_WithElementOnlyChildContent Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
ChildComponent_WithExplicitEventHandler
ChildComponent_WithExplicitStringParameter
ChildComponent_WithLambdaEventHandler
ChildComponent_WithNonPropertyAttributes
ChildComponent_WithPageDirective
ChildComponent_WithParameters
ChildComponent_WithWeaklyTypeEventHandler
ComponentParameter_TypeMismatch_ReportsDiagnostic
Component_WithDocType Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
Component_WithRef
Component_WithRef_WithChildContent Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
Element_WithRef
Element_WithRef_CSharpReservedWord
Element_WithRef_LeadingAt
Element_WithRef_NoLeadingAt
EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup
EventHandler_OnElement_WithDelegate
EventHandler_OnElement_WithEventArgsLambdaDelegate
EventHandler_OnElement_WithEventArgsMethodGroup
EventHandler_OnElement_WithLambdaDelegate
EventHandler_OnElement_WithNoArgMethodGroup
EventHandler_OnElement_WithNoArgsLambdaDelegate
EventHandler_OnElement_WithString
LeadingWhiteSpace_WithCSharpExpression Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
LeadingWhiteSpace_WithComponent Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
LeadingWhiteSpace_WithDirective Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
RazorTemplate_AsComponentParameter Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_AsComponentParameter_MixedContent Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_ContainsComponent Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_FollowedByComponent Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_InCodeBlock Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_InExplicitExpression Add support for Razor templates 2018-08-31 19:10:42 -07:00
RazorTemplate_InImplicitExpression Add support for Razor templates 2018-08-31 19:10:42 -07:00
Regression_597
Regression_609
Regression_772 Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
Regression_773 Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
Regression_784
ScriptTag_WithErrorSuppressed
TrailingWhiteSpace_WithCSharpExpression Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
TrailingWhiteSpace_WithComponent Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
TrailingWhiteSpace_WithDirective Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00