-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Components.Browser package (#5166)
* Add empty Microsoft.AspNetCore.Blazor project * Reorganize Blazor-specific parts of .Components.Browser into Microsoft.AspNetCore.Blazor. Delete redundant Components-CSharp template (it now ships from Templating). * Fix unit test * Add missing assembly description * Move WebAssemblyBlazorApplicationBuilder * Rename BrowserHttpMessageHandler -> WebAssemblyHttpMessageHandler * Delete obsolete BrowserServiceProvider. Rename BrowserRenderer -> WebAssemblyRenderer. * Rename BrowserUriHelper -> WebAssemblyUriHelper * Remove redundant ActivateMonoJSRuntime helper * Fix namespace * Remove redundant MicrosoftNETCoreAppPackageVersion override * Update test namespaces
- Loading branch information
1 parent
0cd79cc
commit ceb1c8e
Showing
93 changed files
with
197 additions
and
1,696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Components/blazor/benchmarks/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 8 additions & 4 deletions
12
src/Components/blazor/samples/HostedInAspNet.Client/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.AspNetCore.Components.Browser.Rendering; | ||
using Microsoft.AspNetCore.Blazor.Hosting; | ||
|
||
namespace HostedInAspNet.Client | ||
{ | ||
public class Program | ||
{ | ||
static void Main(string[] args) | ||
public static void Main(string[] args) | ||
{ | ||
new BrowserRenderer().AddComponent<Home>("app"); | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => | ||
BlazorWebAssemblyHost.CreateDefaultBuilder() | ||
.UseBlazorStartup<Startup>(); | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
...s-CSharp/Components-CSharp.App/Startup.cs → .../samples/HostedInAspNet.Client/Startup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using Microsoft.AspNetCore.Components.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Components_CSharp.App.Services; | ||
|
||
namespace Components_CSharp.App | ||
namespace HostedInAspNet.Client | ||
{ | ||
public class Startup | ||
{ | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
// Since Blazor is running on the server, we can use an application service | ||
// to read the forecast data. | ||
services.AddSingleton<WeatherForecastService>(); | ||
} | ||
|
||
public void Configure(IBlazorApplicationBuilder app) | ||
{ | ||
app.AddComponent<App>("app"); | ||
app.AddComponent<Home>("app"); | ||
} | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/Components/blazor/samples/HostedInAspNet.Server/HostedInAspNet.Server.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.