aspnetcore/test/Microsoft.AspNetCore.Blazor.../TestFiles/DesignTimeCodeGenerationTest
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_WithChildContent
ChildComponent_WithElementOnlyChildContent
ChildComponent_WithExplicitEventHandler
ChildComponent_WithExplicitStringParameter
ChildComponent_WithLambdaEventHandler
ChildComponent_WithNonPropertyAttributes
ChildComponent_WithParameters
ChildComponent_WithWeaklyTypeEventHandler Fix #954 - use weak typing for 'event handlers' 2018-07-05 09:15:01 -07:00
ComponentParameter_TypeMismatch_ReportsDiagnostic
Component_WithDocType Fix #1169 ignore DOCTYPE 2018-07-23 17:42:47 -07:00
Component_WithRef
Element_WithRef
EventHandler_OnElement_WithDelegate
EventHandler_OnElement_WithLambdaDelegate
EventHandler_OnElement_WithString
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_InAttribute 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_InCodeBlock_Dynamic 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
RazorTemplate_MultipleRoots Add support for Razor templates 2018-08-31 19:10:42 -07:00
Regression_597
Regression_609
Regression_772
Regression_773
Regression_784