Merge remote-tracking branch 'origin/release/5.0-preview7'

This commit is contained in:
Pranav K 2020-07-02 11:42:14 -07:00
commit 9a4e6cf97c
No known key found for this signature in database
GPG Key ID: F748807460A27E91
592 changed files with 2203 additions and 788 deletions

View File

@ -35,3 +35,6 @@ indent_size = 4
[*.sh]
indent_size = 4
end_of_line = lf
[*.{razor,cshtml}]
charset = utf-8-bom

View File

@ -1,9 +1,9 @@
{
"sdk": {
"version": "5.0.100-preview.6.20310.4"
"version": "5.0.100-preview.7.20330.3"
},
"tools": {
"dotnet": "5.0.100-preview.6.20310.4",
"dotnet": "5.0.100-preview.7.20330.3",
"runtimes": {
"dotnet/x64": [
"2.1.18",

View File

@ -1,4 +1,4 @@
@page
@page
@model AccessDeniedModel
@{
ViewData["Title"] = "Access denied";

View File

@ -1,4 +1,4 @@
@page
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";

View File

@ -1,4 +1,4 @@
@page
@page
@model SignedOutModel
@{
ViewData["Title"] = "Signed out";

View File

@ -1,2 +1,2 @@
@using Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal
@using Microsoft.AspNetCore.Authentication.AzureAD.UI.Internal
@namespace Microsoft.AspNetCore.Authentication.AzureAD.UI.Pages.Internal

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Hosting
@using Microsoft.AspNetCore.Hosting
@using Microsoft.AspNetCore.Mvc.ViewEngines
@inject IWebHostEnvironment Environment

View File

@ -1,4 +1,4 @@
@page
@page
@model AccessDeniedModel
@{
ViewData["Title"] = "Access denied";

View File

@ -1,4 +1,4 @@
@page
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";

View File

@ -1,4 +1,4 @@
@page
@page
@model SignedOutModel
@{
ViewData["Title"] = "Signed out";

View File

@ -1,2 +1,2 @@
@using Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal
@using Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Internal
@namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI.Pages.Internal

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Hosting
@using Microsoft.AspNetCore.Hosting
@using Microsoft.AspNetCore.Mvc.ViewEngines
@inject IWebHostEnvironment Environment

View File

@ -1,4 +1,4 @@
@page
@page
@model AzureADB2CSample.Pages.AboutModel
@{
}

View File

@ -1,4 +1,4 @@
@page
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Authentication.AzureADB2C.UI
@using Microsoft.AspNetCore.Authentication.AzureADB2C.UI
@using Microsoft.Extensions.Options
@inject IOptionsMonitor<AzureADB2COptions> AzureADB2COptions
@{

View File

@ -1,2 +1,2 @@
@namespace AzureADB2CSample.Pages
@namespace AzureADB2CSample.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -1,4 +1,4 @@
@page
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />

View File

@ -1,4 +1,4 @@
@if (User.Identity.IsAuthenticated)
@if (User.Identity.IsAuthenticated)
{
<ul class="nav navbar-nav navbar-right">
<li class="navbar-text">Hello @User.Identity.Name!</li>

View File

@ -1,2 +1,2 @@
@namespace AzureADSample.Pages
@namespace AzureADSample.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -1,4 +1,4 @@
@implements IDisposable
@implements IDisposable
@inject AuthenticationStateProvider AuthenticationStateProvider
<CascadingValue TValue="Task<AuthenticationState>" Value="@_currentAuthenticationStateTask" ChildContent="@ChildContent" />

View File

@ -1,4 +1,4 @@
@page "/"
@page "/"
<h1>Hello, world!</h1>

View File

@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits LayoutComponentBase
<div class="sidebar">
<NavMenu />

View File

@ -1,4 +1,4 @@
<div class="top-row pl-4 navbar navbar-dark">
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">BlazorServerApp</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>

View File

@ -1 +1 @@
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web

View File

@ -1,4 +1,4 @@
<Router AppAssembly=typeof(StandaloneApp.Program).Assembly>
<Router AppAssembly=typeof(StandaloneApp.Program).Assembly>
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>

View File

@ -1,4 +1,4 @@
@page "/counter"
@page "/counter"
<h1>Counter</h1>

View File

@ -1,4 +1,4 @@
@page "/fetchdata"
@page "/fetchdata"
@page "/fetchdata/{StartDate:datetime}"
@inject HttpClient Http

View File

@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits LayoutComponentBase
<div class="sidebar">
<NavMenu />

View File

@ -1,4 +1,4 @@
<div class="top-row pl-4 navbar navbar-dark">
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">Blazor app</a>
<button class="navbar-toggler" @onclick=ToggleNavMenu>
<span class="navbar-toggler-icon"></span>

View File

@ -1,4 +1,4 @@
@using System.Net.Http
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web

View File

@ -1,4 +1,4 @@
<CascadingAuthenticationState>
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">

View File

@ -1,4 +1,4 @@
@page "/admin-settings"
@page "/admin-settings"
@attribute [Authorize(Roles = "admin")]
@inject IAccessTokenProvider TokenProvider
@inject NavigationManager Navigation

View File

@ -1,4 +1,4 @@
@page "/authentication/{action}"
@page "/authentication/{action}"
@inject StateService State
@inject AuthenticationStateProvider AuthenticationStateProvider
@inject NavigationManager Navigation

View File

@ -1,4 +1,4 @@
@page "/fetchdata"
@page "/fetchdata"
@using Wasm.Authentication.Shared
@implements IDisposable
@attribute [Authorize]

View File

@ -1,4 +1,4 @@
@page "/"
@page "/"
@inject StateService State
@inject IJSRuntime JS
<h1>Hello, world!</h1>

View File

@ -1,4 +1,4 @@
@page "/new-admin"
@page "/new-admin"
@attribute [Authorize]
@inject IAccessTokenProvider TokenProvider
@inject NavigationManager Navigation

View File

@ -1,4 +1,4 @@
@page "/User"
@page "/User"
@attribute [Authorize]
@using System.Text.Json
@using System.Security.Claims

View File

@ -1,4 +1,4 @@
@page "/preferences"
@page "/preferences"
@attribute [Authorize]
@using System.Text.Json;
@using System.Text;

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@inject NavigationManager Navigation
@inject SignOutSessionStateManager SignOutManager

View File

@ -1,4 +1,4 @@
<div class="top-row pl-4 navbar navbar-dark">
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">Wasm.Authentication.Client</a>
<button class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon"></span>

View File

@ -1,4 +1,4 @@
@inject NavigationManager Navigation
@inject NavigationManager Navigation
@using Microsoft.Extensions.Options
@inject IOptions<RemoteAuthenticationOptions<ApiAuthorizationProviderOptions>> Options
@code {

View File

@ -1,4 +1,4 @@
@using System.Net.Http
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication

View File

@ -1,4 +1,4 @@
@page
@page
@namespace Wasm.Authentication.Server.Pages
@model ErrorModel
@{

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Identity
@using Microsoft.AspNetCore.Identity
@using Wasm.Authentication.Server.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -1,4 +1,4 @@
@page "/checkout"
@page "/checkout"
@inject OrderState OrderState
<div class="main">

View File

@ -1,4 +1,4 @@
@page "/orderstatus"
@page "/orderstatus"
@using System.Threading
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime

View File

@ -1,4 +1,4 @@
<div class="form-field">
<div class="form-field">
<label>Name:</label>
<div>
<InputText @bind-Value="@Address.Name" />

View File

@ -1,4 +1,4 @@
@foreach (var pizza in Order.Pizzas)
@foreach (var pizza in Order.Pizzas)
{
<p>
<strong>

View File

@ -1,4 +1,4 @@
@if (Show)
@if (Show)
{
<div class="dialog-container">
<div class="dialog">

View File

@ -1,4 +1,4 @@
@typeparam TItem
@typeparam TItem
@if (items == null)
{

View File

@ -1,4 +1,4 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing

View File

@ -1,4 +1,4 @@
<Router AppAssembly=typeof(Program).Assembly>
<Router AppAssembly=typeof(Program).Assembly>
<Found Context="routeData">
<RouteView RouteData="@routeData" />
</Found>

View File

@ -1,4 +1,4 @@
@page "/"
@page "/"
@inject IJSRuntime JSRuntime
Hello, world!

View File

@ -1,4 +1,4 @@
@page "/json"
@page "/json"
@using System.Text.Json
@inject IJSRuntime JSRuntime

View File

@ -1,4 +1,4 @@
@page "/orgchart"
@page "/orgchart"
@inject IJSRuntime JSRuntime
<h1>Org Chart</h1>

View File

@ -1,4 +1,4 @@
@inject IJSRuntime JSRuntime
@inject IJSRuntime JSRuntime
<div class="person">
<h2>

View File

@ -1,4 +1,4 @@
@page "/renderlist"
@page "/renderlist"
@inject IJSRuntime JSRuntime
<h2>Render List</h2>

View File

@ -1,4 +1,4 @@
@page "/timer"
@page "/timer"
@inject IJSRuntime JSRuntime
@using System.Threading
@implements IDisposable

View File

@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits LayoutComponentBase
<h1>E2E Performance</h1>

View File

@ -1,4 +1,4 @@
@using System.Net.Http
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Web

View File

@ -1,4 +1,4 @@
@using System.Collections.Generic
@using System.Collections.Generic
Child components follow.
<button class="addChild" @onclick="AddChild">Add</button>
<button class="removeChild" @onclick="RemoveChild">Remove</button>

View File

@ -1,4 +1,4 @@
@using Microsoft.JSInterop
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<input @ref="myInput" value="Value set during render" />

View File

@ -1,4 +1,4 @@
@using System.Threading.Tasks
@using System.Threading.Tasks
<div>
<span id="state">@state</span>

View File

@ -1,3 +1,3 @@
@page "/AuthHome"
@page "/AuthHome"
Select an auth test below.

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Routing
@inject NavigationManager NavigationManager

View File

@ -1,4 +1,4 @@
@inherits LayoutComponentBase
@inherits LayoutComponentBase
@Body

View File

@ -1,4 +1,4 @@
@page "/AuthorizeViewCases"
@page "/AuthorizeViewCases"
@using Microsoft.AspNetCore.Components.Authorization
<div id="no-authorization-rule">

View File

@ -1,4 +1,4 @@
@page "/CascadingAuthenticationStateConsumer"
@page "/CascadingAuthenticationStateConsumer"
@using System.Security.Claims
@using Microsoft.AspNetCore.Components.Authorization

View File

@ -1,4 +1,4 @@
@page "/PageAllowingAnonymous"
@page "/PageAllowingAnonymous"
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "NobodyIsInThisRole")]
@attribute [AllowAnonymous]

View File

@ -1,4 +1,4 @@
@page "/PageRequiringAuthorization"
@page "/PageRequiringAuthorization"
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
<div id="auth-success">Welcome to PageRequiringAuthorization!</div>

View File

@ -1,4 +1,4 @@
@page "/PageRequiringPolicy"
@page "/PageRequiringPolicy"
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Policy = "NameMustStartWithB")]
<div id="auth-success">Welcome to PageRequiringPolicy!</div>

View File

@ -1,4 +1,4 @@
@page "/PageRequiringRole"
@page "/PageRequiringRole"
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "TestRole")]
<div id="auth-success">Welcome to PageRequiringRole!</div>

View File

@ -1,4 +1,4 @@
<h3 id="bind-cases">Bind cases</h3>
<h3 id="bind-cases">Bind cases</h3>
@* There are a mix of cases here using bind and bind-value for coverage *@

View File

@ -1,4 +1,4 @@
@typeparam TValue
@typeparam TValue
<input id="@Id" type="text" value="@Value" @onchange="@(EventCallback.Factory.CreateBinder<TValue>(this, _ => ValueChanged.InvokeAsync(_), Value))" />

View File

@ -1,4 +1,4 @@
@*
@*
The only purpose of this component is to validate that cascaded value updates
can pass through entirely unrelated components that wouldn't normally rerender
their children when they themselves are being rerendered.

View File

@ -1,4 +1,4 @@
@*
@*
This component is to show that we can differentiate cascaded values
by name if they are of the same type.
*@

View File

@ -1,4 +1,4 @@
<p>
<p>
Current count:
<strong id="current-count">@CurrentCounter.NumClicks</strong>
</p>

View File

@ -1,4 +1,4 @@
@*
@*
This component is to show that:
1. We can match a cascading parameter based on interface

View File

@ -1,4 +1,4 @@
@implements ICanDecrement
@implements ICanDecrement
@*
While it looks somewhat ridiculous to nest so many CascadingValue components,

View File

@ -1,4 +1,4 @@
<h1>Component capture</h1>
<h1>Component capture</h1>
<p>
This shows how a component reference may be captured as a field value using 'ref' syntax.

View File

@ -1,4 +1,4 @@
<h3 class="interactive">Component With Parameters</h3>
<h3 class="interactive">Component With Parameters</h3>
<ul class="Param1">
@foreach (var value in Param1)

View File

@ -1,4 +1,4 @@
<span>@(isAfterDelay ? "😊" :"WAITING")</span>
<span>@(isAfterDelay ? "😊" :"WAITING")</span>
@code
{
protected bool isAfterDelay;

View File

@ -1,4 +1,4 @@
<p>
<p>
After a 1 second delay, the output should be 100x😊, with no remaining "WAITING" markers.
</p>

View File

@ -1,4 +1,4 @@
@inject Microsoft.Extensions.Configuration.IConfiguration Config
@inject Microsoft.Extensions.Configuration.IConfiguration Config
@inject Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment HostEnvironment
<ul>

View File

@ -1,4 +1,4 @@
<h1>Counter</h1>
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<p><button id="counter" @onclick="@(handleClicks ? (Action)IncrementCount : null)">Click me</button></p>

View File

@ -1,4 +1,4 @@
<h1>Counter</h1>
<h1>Counter</h1>
<!-- Note: passing 'Message' parameter with lowercase name to show it's case insensitive -->
<p>Current count: <MessageComponent message=@currentCount.ToString() /></p>

View File

@ -1,4 +1,4 @@
@inject NavigationManager NavigationManager
@inject NavigationManager NavigationManager
<h3>Select your language</h3>
<select @onchange="@OnSelected" id="culture-selector">

View File

@ -1,4 +1,4 @@
<div id="cool_beans" data-tab="@TabId">@TabId</div>
<div id="cool_beans" data-tab="@TabId">@TabId</div>
@code {
string TabId = "17";

View File

@ -1,4 +1,4 @@
<h1>Dispatching</h1>
<h1>Dispatching</h1>
<p>
Sometimes, renders need to be triggered in response to non-lifecyle events.

View File

@ -1,4 +1,4 @@
<div id="duplicate-on-element">
<div id="duplicate-on-element">
<DuplicateAttributesOnElementChildComponent
BoolAttributeBefore="true"
StringAttributeBefore="original-text"

View File

@ -1,4 +1,4 @@
@if (StringAttributeBefore != null)
@if (StringAttributeBefore != null)
{
<div string="@StringAttributeBefore"
bool="@BoolAttributeBefore"

View File

@ -1,4 +1,4 @@
@using Microsoft.JSInterop
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
<h1>Element capture</h1>

View File

@ -1,4 +1,4 @@
<div>
<div>
<h2>Error throwing buttons</h2>
<p>
<button id="throw-simple-exception" @onclick="@(ThrowSimple)">Throw simple exception</button>

View File

@ -1,4 +1,4 @@
<h3 id="event-bubbling">Bubbling standard event</h3>
<h3 id="event-bubbling">Bubbling standard event</h3>
@* Temporarily hard-coding the internal names - this will be replaced once the Razor compiler supports @onevent:stopPropagation and @onevent:preventDefault *@
<div @onclick="@(() => LogEvent("parent onclick"))">

View File

@ -1,4 +1,4 @@

<button @onclick="OnClick">@Text</button>
@code {

View File

@ -1,4 +1,4 @@
@*
@*
Test cases for using EventCallback with various delegate scenarios that used to be troublesome.
Currently these cases are **VERBOSE** because we haven't yet landed the compiler support for EventCallback.

View File

@ -1,4 +1,4 @@

<button @onclick="OnClick">@Text</button>
@code {

View File

@ -1,4 +1,4 @@

<InnerButton OnClick="@OnClick" Text="@Text"/>
@code {

View File

@ -1,4 +1,4 @@

<button @onclick="OnClick">@Text</button>
@code {

Some files were not shown because too many files have changed in this diff Show More