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 In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
AsyncEventHandler_OnElement_ActionEventArgs_MethodGroup In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
AsyncEventHandler_OnElement_Action_Lambda In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
AsyncEventHandler_OnElement_Action_MethodGroup In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToComponent_SpecifiesValueAndChangeEvent_WithMatchingProperties Add type checking for component parameters 2018-06-05 19:58:50 -07:00
BindToComponent_SpecifiesValueAndChangeEvent_WithoutMatchingProperties In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToComponent_SpecifiesValue_WithMatchingProperties Add type checking for component parameters 2018-06-05 19:58:50 -07:00
BindToComponent_SpecifiesValue_WithoutMatchingProperties In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToComponent_TypeChecked_WithMatchingProperties Add type checking for component parameters 2018-06-05 19:58:50 -07:00
BindToElementFallback_WithFormat_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToElementFallback_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToElementWithSuffix_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BindToElement_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BuiltIn_BindToInputCheckbox_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BuiltIn_BindToInputText_WithFormatFromProperty_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BuiltIn_BindToInputText_WithFormat_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BuiltIn_BindToInputText_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
BuiltIn_BindToInputWithoutType_WritesAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_Simple In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
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 In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithExplicitStringParameter Add type checking for component parameters 2018-06-05 19:58:50 -07:00
ChildComponent_WithLambdaEventHandler In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithNonPropertyAttributes In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithPageDirective In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithParameters Add type checking for component parameters 2018-06-05 19:58:50 -07:00
ChildComponent_WithWeaklyTypeEventHandler Fix #954 - use weak typing for 'event handlers' 2018-07-05 09:15:01 -07:00
ComponentParameter_TypeMismatch_ReportsDiagnostic Add type checking for component parameters 2018-06-05 19:58:50 -07:00
Component_WithDocType Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
Component_WithRef In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
Component_WithRef_WithChildContent Merge sibling nodes during markup block rewrite 2018-08-13 11:17:11 -07:00
Element_WithRef In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
Element_WithRef_CSharpReservedWord
Element_WithRef_LeadingAt
Element_WithRef_NoLeadingAt
EventHandler_OnElement_ArbitraryEventName_WithEventArgsMethodGroup In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
EventHandler_OnElement_WithDelegate
EventHandler_OnElement_WithEventArgsLambdaDelegate In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
EventHandler_OnElement_WithEventArgsMethodGroup In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
EventHandler_OnElement_WithLambdaDelegate
EventHandler_OnElement_WithNoArgMethodGroup In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
EventHandler_OnElement_WithNoArgsLambdaDelegate In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
EventHandler_OnElement_WithString In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
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 In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
Regression_609 Add regression test for 609 2018-05-22 13:58:04 -07:00
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 Fix #784 - allow complex content for HTML 2018-05-22 11:58:46 -07:00
ScriptTag_WithErrorSuppressed In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
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