Skip to content

Commit 74b8015

Browse files
authored
[Blazor] Enables the client to initiate blazor server-side renders (#13147)
* [Blazor] Allows multiple components as entry points * Removes all overloads that register a component statically with aborts selector. * Updates render component to have a RenderMode parameter that indicates how the component must render. Valid values are Static, Server, and ServerPrerendered. * When using Server or ServerPrerendered we emit marker comments into the page that are later used by blazor.server.js to bootrstrap a blazor server-side application.
1 parent 8283e6a commit 74b8015

File tree

66 files changed

+1956
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1956
-623
lines changed

src/Analyzers/Analyzers/test/TestFiles/CompilationFeatureDetectorTest/StartupWithMapBlazorHub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void Configure(IApplicationBuilder app)
1313

1414
app.UseEndpoints(endpoints =>
1515
{
16-
endpoints.MapBlazorHub<App>("app");
16+
endpoints.MapBlazorHub();
1717
});
1818
}
1919

src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Compile Include="Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs" />
88
<Reference Include="Microsoft.AspNetCore.Components.Authorization" />
99
<Reference Include="Microsoft.AspNetCore.Components.Web" />
10-
<Reference Include="Microsoft.AspNetCore.DataProtection" />
10+
<Reference Include="Microsoft.AspNetCore.DataProtection.Extensions" />
1111
<Reference Include="Microsoft.AspNetCore.SignalR" />
1212
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
1313
<Reference Include="Microsoft.Extensions.Caching.Memory" />

src/Components/Server/ref/Microsoft.AspNetCore.Components.Server.netcoreapp3.0.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,12 @@ public sealed partial class ComponentEndpointConventionBuilder : Microsoft.AspNe
88
internal ComponentEndpointConventionBuilder() { }
99
public void Add(System.Action<Microsoft.AspNetCore.Builder.EndpointBuilder> convention) { }
1010
}
11-
public static partial class ComponentEndpointConventionBuilderExtensions
12-
{
13-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder AddComponent(this Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder builder, System.Type componentType, string selector) { throw null; }
14-
}
1511
public static partial class ComponentEndpointRouteBuilderExtensions
1612
{
17-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type type, string selector) { throw null; }
18-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type type, string selector, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) { throw null; }
19-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type componentType, string selector, string path) { throw null; }
20-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Type componentType, string selector, string path, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) { throw null; }
21-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
22-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
23-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector, string path) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
24-
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub<TComponent>(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string selector, string path, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) where TComponent : Microsoft.AspNetCore.Components.IComponent { throw null; }
13+
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints) { throw null; }
14+
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) { throw null; }
15+
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path) { throw null; }
16+
public static Microsoft.AspNetCore.Builder.ComponentEndpointConventionBuilder MapBlazorHub(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string path, System.Action<Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions> configureOptions) { throw null; }
2517
}
2618
}
2719
namespace Microsoft.AspNetCore.Components.Server

src/Components/Server/src/Builder/ComponentEndpointConventionBuilderExtensions.cs

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)