aspnetcore/test/testapps/BasicTestApp
Ryan Nowak 5b658c80a1 Replace @bind with bind-...
This change introduces a 'tag helper' that replaces @bind with custom
code generation that accomplishes roughly the same thing.

This feature lights up by dynamically generating tag helpers that are
visible to tooling and affect the code generation based on:
- pattern recognition of component properties
- attributes that create definitions for elements
- a 'fallback' case for elements

'bind' also supports format strings (currently only for DateTime) via
a separate attribute.

This change introduces the basic framework for bind and tooling support.
We know that we'll have to do more work to define the set of default
'bind' cases for the DOM and to flesh out the conversion/formatting
infrastructure.

This change gets us far enough to replace all of the cases we currently
have tests for :) with the new features. The old @bind technique still
works for now.

Examples:

@* bind an input element to an expression *@
<input bind="@SelectedDate" format="mm/dd/yyyy" />
@functions {
    public DateTime SelectedDate { get; set; }
}

@* bind an arbitrary expression to an arbitrary set of attributes *@
<div bind-myvalue-myevent="@SomeExpression">...</div>

@* write a component that supports bind *@

@* in Counter.cshtml *@
<div>...html omitted for brevity...</div>
@functions {
    public int Value { get; set; } = 1;
    public Action<int> ValueChanged { get; set; }
}

@* in another file *@
<Counter bind-Value="@CurrentValue" />
@functions {
    public int CurrentValue { get; set; }
}
2018-03-29 22:04:24 -07:00
..
HierarchicalImportsTest Support _ViewImports.cshtml files hierarchically 2018-02-18 23:57:20 +00:00
HttpClientTest Use real BCL System.Net.Http.HttpClient. Implements #159 2018-02-28 17:37:42 +00:00
Properties Add E2E tests for BrowserRouter, plus implement querystring/hash support 2018-02-21 10:22:03 +00:00
RouterTest In NavLink, support matching either complete URLs or just URL prefixes (both are necessary for typical nav menus) 2018-03-20 13:15:37 +00:00
wwwroot Support components and static content in external NuGet packages (#247) 2018-03-14 11:23:43 +00:00
AddRemoveChildComponents.cshtml Update BasicTestApp 2018-03-14 11:23:41 +00:00
BasicTestApp.csproj Link on build by default for all configurations, not only Release 2018-03-21 15:58:49 +00:00
BindCasesComponent.cshtml Replace @bind with bind-... 2018-03-29 22:04:24 -07:00
CounterComponent.cshtml
…
CounterComponentUsingChild.cshtml Cover case-insensitive child component parameter names in E2E test 2018-03-19 12:59:59 +00:00
CounterComponentWrapper.cshtml Update BasicTestApp 2018-03-14 11:23:41 +00:00
ExternalContentPackage.cshtml Support components and static content in external NuGet packages (#247) 2018-03-14 11:23:43 +00:00
KeyPressEventComponent.cshtml Simplify apps by moving some commonly used types into Microsoft.AspNetCore.Blazor namespace 2018-02-28 11:29:14 +00:00
MessageComponent.cshtml
…
ParentChildComponent.cshtml Update BasicTestApp 2018-03-14 11:23:41 +00:00
Program.cs
…
PropertiesChangedHandlerChild.cshtml
…
PropertiesChangedHandlerParent.cshtml Konvert to KoreBuild 2018-03-14 11:23:42 +00:00
RedTextComponent.cshtml
…
RenderFragmentToggler.cshtml Simplify apps by moving some commonly used types into Microsoft.AspNetCore.Blazor namespace 2018-02-28 11:29:14 +00:00
TextOnlyComponent.cshtml
…