Imported Upstream version 6.4.0.137

Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-07-26 19:53:28 +00:00
parent e9207cf623
commit ef583813eb
2712 changed files with 74169 additions and 40587 deletions

View File

@@ -0,0 +1,5 @@
<!--
Configuring this here is temporary. Later we'll move the app config
into Program.cs, and it won't be necessary to specify AppAssembly.
-->
<Router AppAssembly="typeof(Program).Assembly" />

View File

@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RunCommand>dotnet</RunCommand>
<RunArguments>blazor serve</RunArguments>
<RestoreAdditionalProjectSources>
https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json;
https://dotnet.myget.org/F/blazor-dev/api/v3/index.json;
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="0.8.0-preview-19104-06" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.8.0-preview-19104-06" PrivateAssets="all" />
<DotNetCliToolReference Include="Microsoft.AspNetCore.Blazor.Cli" Version="0.8.0-preview-19104-06" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,16 @@
@page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p>
<button class="btn btn-primary" onclick="@IncrementCount">Click me</button>
@functions {
int currentCount = 0;
void IncrementCount()
{
currentCount++;
}
}

View File

@@ -0,0 +1,55 @@
@page "/fetchdata"
@inject HttpClient Http
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from the server.</p>
@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}
@functions {
WeatherForecast[] forecasts;
protected override async Task OnInitAsync()
{
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}
class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF { get; set; }
public string Summary { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />

View File

@@ -0,0 +1 @@
@layout MainLayout

View File

@@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Blazor.Hosting;
namespace HelloWorld
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) =>
BlazorWebAssemblyHost.CreateDefaultBuilder()
.UseBlazorStartup<Startup>();
}
}

View File

@@ -0,0 +1,15 @@
@inherits LayoutComponentBase
<div class="sidebar">
<NavMenu />
</div>
<div class="main">
<div class="top-row px-4">
<a href="http://blazor.net" target="_blank" class="ml-md-auto">About</a>
</div>
<div class="content px-4">
@Body
</div>
</div>

View File

@@ -0,0 +1,37 @@
<div class="top-row pl-4 navbar navbar-dark">
<a class="navbar-brand" href="">HelloWorld</a>
<button class="navbar-toggler" onclick="@ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="@NavMenuCssClass" onclick="@ToggleNavMenu">
<ul class="nav flex-column">
<li class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="oi oi-home" aria-hidden="true"></span> Home
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="oi oi-plus" aria-hidden="true"></span> Counter
</NavLink>
</li>
<li class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</li>
</ul>
</div>
@functions {
bool collapseNavMenu = true;
string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}

View File

@@ -0,0 +1,15 @@
<div class="alert alert-secondary mt-4" role="alert">
<span class="oi oi-pencil mr-2" aria-hidden="true"></span>
<strong>@Title</strong>
<span class="text-nowrap">
Please take our
<a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2041371">brief survey</a>
</span>
and tell us what you think.
</div>
@functions {
// Demonstrates how a parent component can supply parameters
[Parameter] string Title { get; set; }
}

View File

@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Components.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace HelloWorld
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
}
public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
}
}
}

View File

@@ -0,0 +1,6 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Layouts
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.JSInterop
@using HelloWorld
@using HelloWorld.Shared

View File

@@ -0,0 +1,2 @@
.
HelloWorld/

View File

@@ -0,0 +1 @@
{"main":"HelloWorld.dll","entryPoint":"HelloWorld.Program::Main","assemblyReferences":["Microsoft.AspNetCore.Components.dll","Microsoft.JSInterop.dll","netstandard.dll","System.Xml.Linq.dll","System.Core.dll","System.dll","System.Numerics.dll","mscorlib.dll","System.Xml.dll","Mono.Security.dll","System.Web.Services.dll","System.Transactions.dll","System.Runtime.Serialization.dll","System.ServiceModel.Internals.dll","System.Net.Http.dll","System.ComponentModel.Composition.dll","System.IO.Compression.FileSystem.dll","System.IO.Compression.dll","System.Drawing.dll","System.Data.dll","Microsoft.Extensions.DependencyInjection.Abstractions.dll","Microsoft.AspNetCore.Blazor.dll","Microsoft.Extensions.DependencyInjection.dll","Mono.WebAssembly.Interop.dll","Microsoft.AspNetCore.Components.Browser.dll"],"cssReferences":[],"jsReferences":[],"linkerEnabled":false}

View File

@@ -0,0 +1 @@
bd78d5f5acc7dde15d43f23a73683befa0032c0d

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
8c85f3f37a29f1349f74c64f1de282d9ffe61f94

View File

@@ -0,0 +1 @@
16e3dac78de3ae5c2e5753a85dadf3a8ff2a9d12

View File

@@ -0,0 +1 @@
d850b07b8fd6f3f5987d23de9af22f4cde519ab0

View File

@@ -0,0 +1 @@
ee5c523cd44838e969ad274a008c740739719cbb

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