Merge pull request #11550 from isaac2004/10348-work
Rename Blazor Templates(#10348)
|
|
@ -129,7 +129,7 @@ try {
|
|||
Get-ChildItem "$repoRoot/*.sln" -Recurse `
|
||||
| ? {
|
||||
# These .sln files are used by the templating engine.
|
||||
($_.Name -ne "RazorComponentsWeb-CSharp.sln")
|
||||
($_.Name -ne "BlazorServerWeb_CSharp.sln")
|
||||
} `
|
||||
| % {
|
||||
Write-Host " Checking $(Split-Path -Leaf $_)"
|
||||
|
|
|
|||
|
|
@ -1,112 +0,0 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Blazor",
|
||||
"Hosted"
|
||||
],
|
||||
"description": "A project template for creating a Blazor application that runs on WebAssembly and is hosted on an ASP.NET Core server.",
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Hosted",
|
||||
"guids": [
|
||||
"4C26868E-5E7C-458D-82E3-040509D0C71F",
|
||||
"5990939C-7E7B-4CFA-86FF-44CA5756498A",
|
||||
"650B3CE7-2E93-4CC4-9F46-466686815EAA",
|
||||
"0AFFA7FD-4E37-4636-AB91-3753E746DB98"
|
||||
],
|
||||
"identity": "Microsoft.Web.Blazor.Hosted.CSharp",
|
||||
"name": "Blazor (ASP.NET Core hosted)",
|
||||
"preferNameDirectory": true,
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"condition": "(HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\")",
|
||||
"path": "BlazorHosted-CSharp.sln"
|
||||
},
|
||||
{
|
||||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "BlazorHosted-CSharp.Server/BlazorHosted-CSharp.Server.csproj"
|
||||
},
|
||||
{
|
||||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "BlazorHosted-CSharp.Client/BlazorHosted-CSharp.Client.csproj"
|
||||
},
|
||||
{
|
||||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "BlazorHosted-CSharp.Shared/BlazorHosted-CSharp.Shared.csproj"
|
||||
}
|
||||
],
|
||||
"shortName": "blazorhosted",
|
||||
"sourceName": "BlazorHosted-CSharp",
|
||||
"sources": [
|
||||
{
|
||||
"source": "./",
|
||||
"target": "./",
|
||||
"exclude": [
|
||||
".template.config/**"
|
||||
],
|
||||
"modifiers": [
|
||||
{
|
||||
"condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"exclude": [
|
||||
"*.sln"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"symbols": {
|
||||
"Framework": {
|
||||
"type": "parameter",
|
||||
"description": "The target framework for the project.",
|
||||
"datatype": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"choice": "netcoreapp3.0",
|
||||
"description": "Target netcoreapp3.0"
|
||||
}
|
||||
],
|
||||
"replaces": "netcoreapp3.0",
|
||||
"defaultValue": "netcoreapp3.0"
|
||||
},
|
||||
"HostIdentifier": {
|
||||
"type": "bind",
|
||||
"binding": "HostIdentifier"
|
||||
},
|
||||
"TemplateBlazorVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Blazor packages to use.",
|
||||
"replaces": "$(TemplateBlazorPackageVersion)",
|
||||
"defaultValue": "${TemplateBlazorVersion}"
|
||||
},
|
||||
"TemplateComponentsVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Components packages to use.",
|
||||
"replaces": "$(TemplateComponentsPackageVersion)",
|
||||
"defaultValue": "${TemplateComponentsVersion}"
|
||||
},
|
||||
"skipRestore": {
|
||||
"type": "parameter",
|
||||
"datatype": "bool",
|
||||
"description": "If specified, skips the automatic restore of the project on create.",
|
||||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
},
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vs-2017.3.host",
|
||||
"name": {
|
||||
"text": "Blazor (ASP.NET Core hosted)",
|
||||
"id": "1050"
|
||||
},
|
||||
"description": {
|
||||
"text": "A project template for creating a Blazor application that runs on WebAssembly and is hosted on an ASP.NET Core server.",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1051"
|
||||
},
|
||||
"order": 610,
|
||||
"icon": "icon.png",
|
||||
"learnMoreLink": "https://github.com/aspnet/blazor",
|
||||
"uiFilters": [
|
||||
"oneaspnet"
|
||||
],
|
||||
"additionalWizardParameters":
|
||||
{
|
||||
"$isMultiProjectTemplate$": "true"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<RazorLangVersion>3.0</RazorLangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="$(TemplateBlazorPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="$(TemplateBlazorPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BlazorHosted-CSharp.Shared\BlazorHosted-CSharp.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
@page "/fetchdata"
|
||||
@using BlazorHosted_CSharp.Shared
|
||||
@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>
|
||||
}
|
||||
|
||||
@code {
|
||||
WeatherForecast[] forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("weatherforecast");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using Microsoft.AspNetCore.Components.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BlazorHosted_CSharp.Client
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
}
|
||||
|
||||
public void Configure(IComponentsApplicationBuilder app)
|
||||
{
|
||||
app.AddComponent<App>("app");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.JSInterop
|
||||
@using BlazorHosted_CSharp.Client
|
||||
@using BlazorHosted_CSharp.Client.Shared
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/dotnetcli.host",
|
||||
"symbolInfo": {
|
||||
"skipRestore": {
|
||||
"longName": "no-restore",
|
||||
"shortName": ""
|
||||
},
|
||||
"Framework": {
|
||||
"longName": "framework"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Blazor",
|
||||
"Library"
|
||||
],
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Library",
|
||||
"identity": "Microsoft.Web.Blazor.Library.CSharp",
|
||||
"name": "Blazor Library",
|
||||
"preferNameDirectory": true,
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "BlazorLibrary-CSharp.csproj"
|
||||
}
|
||||
],
|
||||
"shortName": "blazorlib",
|
||||
"sourceName": "BlazorLibrary-CSharp",
|
||||
"sources": [
|
||||
{
|
||||
"source": "./",
|
||||
"target": "./",
|
||||
"exclude": [
|
||||
".template.config/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"symbols": {
|
||||
"Framework": {
|
||||
"type": "parameter",
|
||||
"description": "The target framework for the project.",
|
||||
"datatype": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"choice": "netcoreapp3.0",
|
||||
"description": "Target netcoreapp3.0"
|
||||
}
|
||||
],
|
||||
"replaces": "netcoreapp3.0",
|
||||
"defaultValue": "netcoreapp3.0"
|
||||
},
|
||||
"HostIdentifier": {
|
||||
"type": "bind",
|
||||
"binding": "HostIdentifier"
|
||||
},
|
||||
"TemplateBlazorVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Blazor packages to use.",
|
||||
"replaces": "$(TemplateBlazorPackageVersion)",
|
||||
"defaultValue": "${TemplateBlazorVersion}"
|
||||
},
|
||||
"TemplateComponentsVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Components packages to use.",
|
||||
"replaces": "$(TemplateComponentsPackageVersion)",
|
||||
"defaultValue": "${TemplateComponentsVersion}"
|
||||
},
|
||||
"skipRestore": {
|
||||
"type": "parameter",
|
||||
"datatype": "bool",
|
||||
"description": "If specified, skips the automatic restore of the project on create.",
|
||||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
},
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<IsPackable>true</IsPackable>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<RazorLangVersion>3.0</RazorLangVersion>
|
||||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- .js/.css files will be referenced via <script>/<link> tags; other content files will just be included in the app's 'dist' directory without any tags referencing them -->
|
||||
<EmbeddedResource Include="content\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
<EmbeddedResource Include="content\**\*.css" LogicalName="blazor:css:%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
<EmbeddedResource Include="content\**" Exclude="**\*.js;**\*.css" LogicalName="blazor:file:%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(TemplateComponentsPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<div class="my-component">
|
||||
This Blazor component is defined in the <strong>BlazorLibrary-CSharp</strong> package.
|
||||
</div>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using Microsoft.JSInterop;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BlazorLibrary_CSharp
|
||||
{
|
||||
public class ExampleJsInterop
|
||||
{
|
||||
public static Task<string> Prompt(IJSRuntime jsRuntime, string message)
|
||||
{
|
||||
// Implemented in exampleJsInterop.js
|
||||
return jsRuntime.InvokeAsync<string>(
|
||||
"exampleJsFunctions.showPrompt",
|
||||
message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 378 B |
|
|
@ -1,8 +0,0 @@
|
|||
// This file is to show how a library package may provide JavaScript interop features
|
||||
// wrapped in a .NET API
|
||||
|
||||
window.exampleJsFunctions = {
|
||||
showPrompt: function (message) {
|
||||
return prompt(message, 'Type anything here');
|
||||
}
|
||||
};
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
This file is to show how CSS and other static resources (such as images) can be
|
||||
used from a library project/package.
|
||||
*/
|
||||
|
||||
.my-component {
|
||||
border: 2px dashed red;
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
background-image: url('background.png');
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/dotnetcli.host",
|
||||
"symbolInfo": {
|
||||
"skipRestore": {
|
||||
"longName": "no-restore",
|
||||
"shortName": ""
|
||||
},
|
||||
"Framework": {
|
||||
"longName": "framework"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Blazor",
|
||||
"Standalone"
|
||||
],
|
||||
"description": "A project template for creating a standalone Blazor application that runs on WebAssembly.",
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Standalone",
|
||||
"identity": "Microsoft.Web.Blazor.Standalone.CSharp",
|
||||
"name": "Blazor (client-side)",
|
||||
"preferNameDirectory": true,
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "BlazorStandalone-CSharp.csproj"
|
||||
}
|
||||
],
|
||||
"shortName": "blazor",
|
||||
"sourceName": "BlazorStandalone-CSharp",
|
||||
"sources": [
|
||||
{
|
||||
"source": "./",
|
||||
"target": "./",
|
||||
"exclude": [
|
||||
".template.config/**"
|
||||
]
|
||||
}
|
||||
],
|
||||
"symbols": {
|
||||
"Framework": {
|
||||
"type": "parameter",
|
||||
"description": "The target framework for the project.",
|
||||
"datatype": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"choice": "netcoreapp3.0",
|
||||
"description": "Target netcoreapp3.0"
|
||||
}
|
||||
],
|
||||
"replaces": "netcoreapp3.0",
|
||||
"defaultValue": "netcoreapp3.0"
|
||||
},
|
||||
"HostIdentifier": {
|
||||
"type": "bind",
|
||||
"binding": "HostIdentifier"
|
||||
},
|
||||
"TemplateBlazorVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Blazor packages to use.",
|
||||
"replaces": "$(TemplateBlazorPackageVersion)",
|
||||
"defaultValue": "${TemplateBlazorVersion}"
|
||||
},
|
||||
"TemplateComponentsVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Components packages to use.",
|
||||
"replaces": "$(TemplateComponentsPackageVersion)",
|
||||
"defaultValue": "${TemplateComponentsVersion}"
|
||||
},
|
||||
"skipRestore": {
|
||||
"type": "parameter",
|
||||
"datatype": "bool",
|
||||
"description": "If specified, skips the automatic restore of the project on create.",
|
||||
"defaultValue": "false"
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
},
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vs-2017.3.host",
|
||||
"name": {
|
||||
"text": "Blazor (client-side)",
|
||||
"id": "1050"
|
||||
},
|
||||
"description": {
|
||||
"text": "A project template for creating a standalone Blazor application that runs on WebAssembly.",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1051"
|
||||
},
|
||||
"order": 620,
|
||||
"icon": "icon.png",
|
||||
"learnMoreLink": "https://github.com/aspnet/blazor",
|
||||
"uiFilters": [
|
||||
"oneaspnet"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<Router AppAssembly="typeof(Program).Assembly">
|
||||
<NotFoundContent>
|
||||
<p>Sorry, there's nothing at this address.</p>
|
||||
</NotFoundContent>
|
||||
</Router>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
@page "/"
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
|
||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using Microsoft.AspNetCore.Blazor.Hosting;
|
||||
|
||||
namespace BlazorStandalone_CSharp
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) =>
|
||||
BlazorWebAssemblyHost.CreateDefaultBuilder()
|
||||
.UseBlazorStartup<Startup>();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
@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>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<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=2098127">brief survey</a>
|
||||
</span>
|
||||
and tell us what you think.
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// Demonstrates how a parent component can supply parameters
|
||||
[Parameter] string Title { get; set; }
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.JSInterop
|
||||
@using BlazorStandalone_CSharp
|
||||
@using BlazorStandalone_CSharp.Shared
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
|
||||
|
||||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
app {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.top-row {
|
||||
height: 3.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.main .top-row {
|
||||
background-color: #e6e6e6;
|
||||
border-bottom: 1px solid #d6d5d5;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
|
||||
}
|
||||
|
||||
.sidebar .top-row {
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.sidebar .navbar-brand {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.sidebar .oi {
|
||||
width: 2rem;
|
||||
font-size: 1.1rem;
|
||||
vertical-align: text-top;
|
||||
top: -2px;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
font-size: 0.9rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.nav-item:first-of-type {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.nav-item:last-of-type {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.nav-item a {
|
||||
color: #d7d7d7;
|
||||
border-radius: 4px;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 3rem;
|
||||
}
|
||||
|
||||
.nav-item a.active {
|
||||
background-color: rgba(255,255,255,0.25);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-item a:hover {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-top: 1.1rem;
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.valid.modified:not([type=checkbox]) {
|
||||
outline: 1px solid #26b050;
|
||||
}
|
||||
|
||||
.invalid {
|
||||
outline: 1px solid red;
|
||||
}
|
||||
|
||||
.validation-message {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.main .top-row {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
app {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
height: 100vh;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.main .top-row {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.main > div {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar .collapse {
|
||||
/* Never collapse the sidebar for wide screens */
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>BlazorStandalone-CSharp</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<app>Loading...</app>
|
||||
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -5,6 +5,9 @@
|
|||
"longName": "no-restore",
|
||||
"shortName": ""
|
||||
},
|
||||
"Hosted": {
|
||||
"longName": "hosted"
|
||||
},
|
||||
"Framework": {
|
||||
"longName": "framework"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
|
@ -0,0 +1,154 @@
|
|||
{
|
||||
"author": "Microsoft",
|
||||
"classifications": [
|
||||
"Web",
|
||||
"Blazor",
|
||||
"WebAssembly"
|
||||
],
|
||||
"description": "A project template for creating a Blazor app that runs on WebAssembly and is optionally hosted by an ASP.NET Core app. This template can be used for web apps with rich dynamic user interfaces (UIs).",
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Wasm",
|
||||
"guids": [
|
||||
"4C26868E-5E7C-458D-82E3-040509D0C71F",
|
||||
"5990939C-7E7B-4CFA-86FF-44CA5756498A",
|
||||
"650B3CE7-2E93-4CC4-9F46-466686815EAA",
|
||||
"0AFFA7FD-4E37-4636-AB91-3753E746DB98"
|
||||
],
|
||||
"identity": "Microsoft.Web.Blazor.Wasm.CSharp",
|
||||
"name": "Blazor WebAssembly App",
|
||||
"preferNameDirectory": true,
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"condition": "(Hosted && (HostIdentifier == \"dotnetcli\" || HostIdentifier == \"dotnetcli-preview\"))",
|
||||
"path": "BlazorWasm-CSharp.sln"
|
||||
},
|
||||
{
|
||||
"condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "Server/BlazorWasm-CSharp.Server.csproj"
|
||||
},
|
||||
{
|
||||
"condition": "(!Hosted)",
|
||||
"path": "BlazorWasm-CSharp.Client.csproj"
|
||||
},
|
||||
{
|
||||
"condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "Client/BlazorWasm-CSharp.Client.csproj"
|
||||
},
|
||||
{
|
||||
"condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"path": "Shared/BlazorWasm-CSharp.Shared.csproj"
|
||||
}
|
||||
],
|
||||
"shortName": "blazorwasm",
|
||||
"sourceName": "BlazorWasm-CSharp",
|
||||
"sources": [
|
||||
{
|
||||
"source": "./",
|
||||
"target": "./",
|
||||
"exclude": [
|
||||
".template.config/**"
|
||||
],
|
||||
"modifiers": [
|
||||
{
|
||||
"condition": "(!Hosted)",
|
||||
"exclude": [
|
||||
"Server/**",
|
||||
"Shared/**",
|
||||
"*.sln"
|
||||
],
|
||||
"rename": {
|
||||
".Client.csproj": ".csproj",
|
||||
"Client": "."
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "(Hosted)",
|
||||
"exclude": [
|
||||
"Client/wwwroot/sample-data/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"condition": "(Hosted && HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")",
|
||||
"exclude": [
|
||||
"*.sln"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"symbols": {
|
||||
"Framework": {
|
||||
"type": "parameter",
|
||||
"description": "The target framework for the project.",
|
||||
"datatype": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"choice": "netcoreapp3.0",
|
||||
"description": "Target netcoreapp3.0"
|
||||
}
|
||||
],
|
||||
"replaces": "netcoreapp3.0",
|
||||
"defaultValue": "netcoreapp3.0"
|
||||
},
|
||||
"HostIdentifier": {
|
||||
"type": "bind",
|
||||
"binding": "HostIdentifier"
|
||||
},
|
||||
"TemplateBlazorVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Blazor packages to use.",
|
||||
"replaces": "$(TemplateBlazorPackageVersion)",
|
||||
"defaultValue": "${TemplateBlazorVersion}"
|
||||
},
|
||||
"TemplateComponentsVersionSymbol": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"description": "Specifies which version of Components packages to use.",
|
||||
"replaces": "$(TemplateComponentsPackageVersion)",
|
||||
"defaultValue": "${TemplateComponentsVersion}"
|
||||
},
|
||||
"skipRestore": {
|
||||
"type": "parameter",
|
||||
"datatype": "bool",
|
||||
"description": "If specified, skips the automatic restore of the project on create.",
|
||||
"defaultValue": "false"
|
||||
},
|
||||
"Hosted": {
|
||||
"type": "parameter",
|
||||
"datatype": "bool",
|
||||
"defaultValue": "false",
|
||||
"description": "If specified, includes an ASP.NET Core host for the Blazor app."
|
||||
}
|
||||
},
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
},
|
||||
"postActions": [
|
||||
{
|
||||
"condition": "(!skipRestore && Hosted)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
},
|
||||
{
|
||||
"condition": "(!skipRestore && !Hosted)",
|
||||
"description": "Restore NuGet packages required by this project.",
|
||||
"manualInstructions": [
|
||||
{
|
||||
"text": "Run 'dotnet restore'"
|
||||
}
|
||||
],
|
||||
"args": {
|
||||
"files": [ "BlazorWasm-CSharp.Client.csproj" ]
|
||||
},
|
||||
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
|
||||
"continueOnError": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vs-2017.3.host",
|
||||
"name": {
|
||||
"text": "Blazor WebAssembly App",
|
||||
"id": "1050"
|
||||
},
|
||||
"description": {
|
||||
"text": "A project template for creating a Blazor app that runs on WebAssembly and is optionally hosted by an ASP.NET Core app. This template can be used for web apps with rich dynamic user interfaces (UIs).",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1051"
|
||||
},
|
||||
"order": 610,
|
||||
"icon": "icon.png",
|
||||
"learnMoreLink": "https://github.com/aspnet/blazor",
|
||||
"uiFilters": [
|
||||
"oneaspnet"
|
||||
],
|
||||
"additionalWizardParameters": {
|
||||
"$isMultiProjectTemplate$": "true"
|
||||
},
|
||||
"symbolInfo": [
|
||||
{
|
||||
"id": "Hosted",
|
||||
"name": {
|
||||
"text": "ASP.NET Core _hosted"
|
||||
},
|
||||
"isVisible": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2,11 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.0.0
|
||||
MinimumVisualStudioVersion = 16.0.0.0
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Server", "BlazorHosted-CSharp.Server\BlazorHosted-CSharp.Server.csproj", "{650B3CE7-2E93-4CC4-9F46-466686815EAA}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm-CSharp.Server", "Server\BlazorWasm-CSharp.Server.csproj", "{650B3CE7-2E93-4CC4-9F46-466686815EAA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Client", "BlazorHosted-CSharp.Client\BlazorHosted-CSharp.Client.csproj", "{5990939C-7E7B-4CFA-86FF-44CA5756498A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm-CSharp.Client", "Client\BlazorWasm-CSharp.Client.csproj", "{5990939C-7E7B-4CFA-86FF-44CA5756498A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted-CSharp.Shared", "BlazorHosted-CSharp.Shared\BlazorHosted-CSharp.Shared.csproj", "{0AFFA7FD-4E37-4636-AB91-3753E746DB98}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWasm-CSharp.Shared", "Shared\BlazorWasm-CSharp.Shared.csproj", "{0AFFA7FD-4E37-4636-AB91-3753E746DB98}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<RazorLangVersion>3.0</RazorLangVersion>
|
||||
</PropertyGroup>
|
||||
|
|
@ -9,8 +10,14 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="$(TemplateBlazorPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="$(TemplateBlazorPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
</ItemGroup>
|
||||
<!--#if Hosted -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Shared\BlazorWasm-CSharp.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<!--#endif -->
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
@page "/fetchdata"
|
||||
@*#if (Hosted)
|
||||
@using BlazorWasm_CSharp.Shared
|
||||
#endif*@
|
||||
@inject HttpClient Http
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
|
@ -39,17 +42,23 @@ else
|
|||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@*#if (Hosted)
|
||||
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("WeatherForecast");
|
||||
#else
|
||||
forecasts = await Http.GetJsonAsync<WeatherForecast[]>("sample-data/weather.json");
|
||||
#endif*@
|
||||
}
|
||||
|
||||
class WeatherForecast
|
||||
@*#if (!Hosted)
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF { get; set; }
|
||||
|
||||
public string Summary { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
#endif*@
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
using Microsoft.AspNetCore.Blazor.Hosting;
|
||||
|
||||
namespace BlazorHosted_CSharp.Client
|
||||
#if (Hosted)
|
||||
namespace BlazorWasm_CSharp.Client
|
||||
#else
|
||||
namespace BlazorWasm_CSharp
|
||||
#endif
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">BlazorHosted-CSharp</a>
|
||||
<a class="navbar-brand" href="">BlazorWasm-CSharp</a>
|
||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
using Microsoft.AspNetCore.Components.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BlazorStandalone_CSharp
|
||||
#if (Hosted)
|
||||
namespace BlazorWasm_CSharp.Client
|
||||
#else
|
||||
namespace BlazorWasm_CSharp
|
||||
#endif
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.JSInterop
|
||||
@*#if (!Hosted)
|
||||
@using BlazorWasm_CSharp
|
||||
@using BlazorWasm_CSharp.Shared
|
||||
#else
|
||||
@using BlazorWasm_CSharp.Client
|
||||
@using BlazorWasm_CSharp.Client.Shared
|
||||
#endif*@
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>BlazorHosted-CSharp</title>
|
||||
<title>BlazorWasm-CSharp</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
|
|
@ -11,8 +11,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BlazorHosted-CSharp.Client\BlazorHosted-CSharp.Client.csproj" />
|
||||
<ProjectReference Include="..\BlazorHosted-CSharp.Shared\BlazorHosted-CSharp.Shared.csproj" />
|
||||
<ProjectReference Include="..\Client\BlazorWasm-CSharp.Client.csproj" />
|
||||
<ProjectReference Include="..\Shared\BlazorWasm-CSharp.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
using BlazorHosted_CSharp.Shared;
|
||||
using BlazorWasm_CSharp.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BlazorHosted_CSharp.Server.Controllers
|
||||
namespace BlazorWasm_CSharp.Server.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace BlazorHosted_CSharp.Server
|
||||
namespace BlazorWasm_CSharp.Server
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
|
@ -6,7 +6,7 @@ using Microsoft.Extensions.Hosting;
|
|||
using Newtonsoft.Json.Serialization;
|
||||
using System.Linq;
|
||||
|
||||
namespace BlazorHosted_CSharp.Server
|
||||
namespace BlazorWasm_CSharp.Server
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace BlazorHosted_CSharp.Shared
|
||||
namespace BlazorWasm_CSharp.Shared
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
|
|
@ -2,11 +2,12 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-RazorComponentsWeb_CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
<UserSecretsId Condition="'$(IndividualAuth)' == 'True' OR '$(OrganizationalAuth)' == 'True'">aspnet-BlazorServerWeb_CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502</UserSecretsId>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' != 'True'">0</WebProject_DirectoryAccessLevelKey>
|
||||
<WebProject_DirectoryAccessLevelKey Condition="'$(OrganizationalAuth)' == 'True' AND '$(OrgReadAccess)' == 'True'">1</WebProject_DirectoryAccessLevelKey>
|
||||
<NoDefaultLaunchSettingsFile Condition="'$(ExcludeLaunchSettings)' == 'True'">True</NoDefaultLaunchSettingsFile>
|
||||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">RazorComponentsWeb_CSharp</RootNamespace>
|
||||
<RootNamespace Condition="'$(name)' != '$(name{-VALUE-FORMS-}safe_namespace)'">BlazorServerWeb_CSharp</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--#if (IndividualLocalAuth && !UseLocalDB) -->
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<GeneratedContent Include="EmptyWeb-CSharp.csproj.in" OutputPath="content/EmptyWeb-CSharp/Company.WebApplication1.csproj" />
|
||||
<GeneratedContent Include="EmptyWeb-FSharp.fsproj.in" OutputPath="content/EmptyWeb-FSharp/Company.WebApplication1.fsproj" />
|
||||
<GeneratedContent Include="GrpcService-CSharp.csproj.in" OutputPath="content/GrpcService-CSharp/GrpcService-CSharp.csproj" />
|
||||
<GeneratedContent Include="RazorComponentsWeb-CSharp.csproj.in" OutputPath="content/RazorComponentsWeb-CSharp/RazorComponentsWeb-CSharp.csproj" />
|
||||
<GeneratedContent Include="BlazorServerWeb-CSharp.csproj.in" OutputPath="content/BlazorServerWeb-CSharp/BlazorServerWeb-CSharp.csproj" />
|
||||
<GeneratedContent Include="RazorPagesWeb-CSharp.csproj.in" OutputPath="content/RazorPagesWeb-CSharp/Company.WebApplication1.csproj" />
|
||||
<GeneratedContent Include="RazorClassLibrary-CSharp.csproj.in" OutputPath="content/RazorClassLibrary-CSharp/Company.RazorClassLibrary1.csproj" />
|
||||
<GeneratedContent Include="StarterWeb-CSharp.csproj.in" OutputPath="content/StarterWeb-CSharp/Company.WebApplication1.csproj" />
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@
|
|||
"Web",
|
||||
"Blazor"
|
||||
],
|
||||
"name": "Blazor (server-side)",
|
||||
"name": "Blazor Server App",
|
||||
"generatorVersions": "[1.0.0.0-*)",
|
||||
"description": "A project template for creating a Blazor application that runs server-side inside an ASP.NET Core application. This template can be used for web applications with rich dynamic user interfaces (UIs).",
|
||||
"groupIdentity": "Microsoft.Web.RazorComponents",
|
||||
"description": "A project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template can be used for web apps with rich dynamic user interfaces (UIs).",
|
||||
"groupIdentity": "Microsoft.Web.Blazor.Server",
|
||||
"precedence": "5000",
|
||||
"identity": "Microsoft.Web.RazorComponents.CSharp.3.0",
|
||||
"shortName": "blazorserverside",
|
||||
"identity": "Microsoft.Web.Blazor.Server.CSharp.3.0",
|
||||
"shortName": "blazorserver",
|
||||
"thirdPartyNotices": "https://aka.ms/aspnetcore-template-3pn-210",
|
||||
"tags": {
|
||||
"language": "C#",
|
||||
"type": "project"
|
||||
},
|
||||
"sourceName": "RazorComponentsWeb-CSharp",
|
||||
"sourceName": "BlazorServerWeb-CSharp",
|
||||
"preferNameDirectory": true,
|
||||
"guids": [
|
||||
"09732173-2cef-46b7-83db-1334bcb079d3", // Tenant ID
|
||||
|
|
@ -233,8 +233,8 @@
|
|||
"UserSecretsId": {
|
||||
"type": "parameter",
|
||||
"datatype": "string",
|
||||
"replaces": "aspnet-RazorComponentsWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
|
||||
"defaultValue": "aspnet-RazorComponentsWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
|
||||
"replaces": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
|
||||
"defaultValue": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502",
|
||||
"description": "The ID to use for secrets (use with OrgReadAccess or Individual auth)."
|
||||
},
|
||||
"ExcludeLaunchSettings": {
|
||||
|
|
@ -361,7 +361,7 @@
|
|||
},
|
||||
"primaryOutputs": [
|
||||
{
|
||||
"path": "RazorComponentsWeb-CSharp.csproj"
|
||||
"path": "BlazorServerWeb-CSharp.csproj"
|
||||
}
|
||||
],
|
||||
"defaultName": "WebApplication1",
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/vs-2017.3.host",
|
||||
"name": {
|
||||
"text": "Blazor (server-side)",
|
||||
"text": "Blazor Server App",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1029"
|
||||
},
|
||||
"description": {
|
||||
"text": "A project template for creating a Blazor application that runs server-side inside an ASP.NET Core application. This template can be used for web applications with rich dynamic user interfaces (UIs).",
|
||||
"text": "A project template for creating a Blazor server app that runs server-side inside an ASP.NET Core app and handles user interactions over a SignalR connection. This template can be used for web apps with rich dynamic user interfaces (UIs).",
|
||||
"package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
|
||||
"id": "1030"
|
||||
},
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
|
@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Identity;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Areas.Identity
|
||||
namespace BlazorServerWeb_CSharp.Areas.Identity
|
||||
{
|
||||
/// <summary>
|
||||
/// An <see cref="AuthenticationStateProvider"/> service that revalidates the
|
||||
|
|
@ -4,7 +4,7 @@ using System.Text;
|
|||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data
|
||||
namespace BlazorServerWeb_CSharp.Data
|
||||
{
|
||||
public class ApplicationDbContext : IdentityDbContext
|
||||
{
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using RazorComponentsWeb_CSharp.Data;
|
||||
using BlazorServerWeb_CSharp.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("00000000000000_CreateIdentitySchema")]
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
public partial class CreateIdentitySchema : Migration
|
||||
{
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using RazorComponentsWeb_CSharp.Data;
|
||||
using BlazorServerWeb_CSharp.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using RazorComponentsWeb_CSharp.Data;
|
||||
using BlazorServerWeb_CSharp.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("00000000000000_CreateIdentitySchema")]
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
public partial class CreateIdentitySchema : Migration
|
||||
{
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
// <auto-generated />
|
||||
using System;
|
||||
using RazorComponentsWeb_CSharp.Data;
|
||||
using BlazorServerWeb_CSharp.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data.Migrations
|
||||
namespace BlazorServerWeb_CSharp.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data
|
||||
namespace BlazorServerWeb_CSharp.Data
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
|
|
@ -2,7 +2,7 @@ using System;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp.Data
|
||||
namespace BlazorServerWeb_CSharp.Data
|
||||
{
|
||||
public class WeatherForecastService
|
||||
{
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
@page "/fetchdata"
|
||||
@using RazorComponentsWeb_CSharp.Data
|
||||
|
||||
@using BlazorServerWeb_CSharp.Data
|
||||
@inject WeatherForecastService ForecastService
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@page "/"
|
||||
@namespace RazorComponentsWeb_CSharp.Pages
|
||||
@namespace BlazorServerWeb_CSharp.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>RazorComponentsWeb-CSharp</title>
|
||||
<title>BlazorServerWeb-CSharp</title>
|
||||
<base href="~/" />
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
|
|
@ -9,7 +9,7 @@ using Microsoft.Extensions.Configuration;
|
|||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp
|
||||
namespace BlazorServerWeb_CSharp
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"RazorComponentsWeb-CSharp": {
|
||||
"BlazorServerWeb-CSharp": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
//#if(RequiresHttps)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">BlazorStandalone-CSharp</a>
|
||||
<a class="navbar-brand" href="">BlazorServerWeb-CSharp</a>
|
||||
<button class="navbar-toggler" @onclick="ToggleNavMenu">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
|
@ -38,11 +38,11 @@ using Microsoft.Extensions.Hosting;
|
|||
using Microsoft.IdentityModel.Tokens;
|
||||
#endif
|
||||
#if (IndividualLocalAuth)
|
||||
using RazorComponentsWeb_CSharp.Areas.Identity;
|
||||
using BlazorServerWeb_CSharp.Areas.Identity;
|
||||
#endif
|
||||
using RazorComponentsWeb_CSharp.Data;
|
||||
using BlazorServerWeb_CSharp.Data;
|
||||
|
||||
namespace RazorComponentsWeb_CSharp
|
||||
namespace BlazorServerWeb_CSharp
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
|
|
@ -3,5 +3,5 @@
|
|||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.JSInterop
|
||||
@using RazorComponentsWeb_CSharp
|
||||
@using RazorComponentsWeb_CSharp.Shared
|
||||
@using BlazorServerWeb_CSharp
|
||||
@using BlazorServerWeb_CSharp.Shared
|
||||