aspnetcore/test/Microsoft.AspNetCore.Blazor.../TestFiles/RuntimeCodeGenerationTest
Ryan Nowak 6f383a0f0f Adds support for 'Context' parameters on components (#1470)
Adds support for 'Context' parameters on components

This change allows you to set the parameter name of a parameterized child content by using the `Context` attribute on the component. The `Context` attribute will be defined (and shown by completion) when the component has one or more declared parameterized (`RenderFragment<>`) child content parameters.

This is nice for cases where you are using implicit child content:

```
<ol>
  <Repeater Items="People" Context="person">
    <li>@person.FirstName</li>
  </Repeater>
</ol>
```

 or, when you have multiple child content elements and want them all to have the same parameter name:

 ```
<MyComponent Items="People" Context="person">
    <ChildContent1><div>@person.FirstName</div></ChildContent1>
    <ChildContent2><div>@person.LastName</div></ChildContent2>
</Repeater>
```

The parameter name can be overridden by using the `Context` parameter on the child content element:

 ```
<MyComponent Items="People" Context="person">
    <ChildContent1 Context="item"><div>@item.FirstName</div></ChildContent1>
    <ChildContent2><div>@person.LastName</div></ChildContent2>
</Repeater>
```

If the component defines a `Context` parameter already then we won't synthesize one - your component's parameter will work exactly as it did before this feature.
2018-09-24 12:22:16 -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
BodyAndAttributeChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
BodyAndExplicitChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07: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_Generic Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -07:00
ChildComponent_GenericBind Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericBindWeaklyTyped Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericBindWeaklyTyped_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericBind_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericChildContent Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -07:00
ChildComponent_GenericChildContent_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericWeaklyTypedAttribute Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_GenericWeaklyTypedAttribute_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_Generic_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_Generic_TypeInference_Multiple Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_MultipleGenerics Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -07:00
ChildComponent_MultipleGenerics_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
ChildComponent_Simple In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithElementOnlyChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithExplicitChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithExplicitEventHandler In Blazor cshtml, auto-reference Microsoft.AspNetCore.Blazor and .Components (#751) 2018-05-05 17:55:08 +01:00
ChildComponent_WithExplicitGenericChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithExplicitStringParameter Add type checking for component parameters 2018-06-05 19:58:50 -07:00
ChildComponent_WithGenericChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithGenericChildContent_SetsParameterName Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
ChildComponent_WithGenericChildContent_SetsParameterNameOnComponent Adds support for 'Context' parameters on components (#1470) 2018-09-24 12:22:16 -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
ComponentWithTypeParameters Add support for generic-typed components (#1417) 2018-09-16 14:01:15 -07:00
Component_WithDocType Reenable markup blocks (#1286) 2018-08-10 16:29:39 -07:00
Component_WithRef Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
Component_WithRef_WithChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
Element_WithRef Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07: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 Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
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 Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
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
GenericComponent_WithComponentRef Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07:00
GenericComponent_WithComponentRef_TypeInference Add Type Inference for Generic-Typed Components 2018-09-20 12:19:26 -07: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
MultipleExplictChildContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_AsComponentParameter Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_AsComponentParameter_MixedContent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_ContainsComponent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_FollowedByComponent Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_Generic_AsComponentParameter Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_Generic_InImplicitExpression Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_InCodeBlock Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_InExplicitExpression Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_InImplicitExpression Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_NonGeneric_AsComponentParameter Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -07:00
RazorTemplate_NonGeneric_InImplicitExpression Add Support for Templated Components (#1404) 2018-09-10 18:59:51 -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