Update API (#30428)
parent
1c66dfb67f
commit
2ae517752b
|
@ -49,7 +49,7 @@ The following example demonstrates the dynamic registration of the preceding `Qu
|
|||
|
||||
:::moniker range=">= aspnetcore-8.0"
|
||||
|
||||
* In a Blazor Web App app, modify the call to <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A> in the server-side `Program` file:
|
||||
* In a Blazor Web App app, modify the call to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A> in the server-side `Program` file:
|
||||
|
||||
```csharp
|
||||
builder.Services.AddRazorComponents()
|
||||
|
@ -228,7 +228,7 @@ Add a package reference for [`Microsoft.AspNetCore.Components.CustomElements`](h
|
|||
|
||||
### Blazor Web App registration
|
||||
|
||||
To register a root component as a custom element in a Blazor Web App, modify the call to <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A> in the server-side `Program` file. The following example registers the `Counter` component with the custom HTML element `my-counter`:
|
||||
To register a root component as a custom element in a Blazor Web App, modify the call to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A> in the server-side `Program` file. The following example registers the `Counter` component with the custom HTML element `my-counter`:
|
||||
|
||||
<!-- UPDATE 8.0 Per PU issue https://github.com/dotnet/aspnetcore/issues/42329 and
|
||||
PR https://github.com/dotnet/aspnetcore/pull/42314.
|
||||
|
@ -351,7 +351,7 @@ Supported parameter types:
|
|||
|
||||
Register a root component as a custom element:
|
||||
|
||||
* In a Blazor Server app, modify the call to <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A> in the `Program` file:
|
||||
* In a Blazor Server app, modify the call to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A> in the `Program` file:
|
||||
|
||||
```csharp
|
||||
builder.Services.AddServerSideBlazor(options =>
|
||||
|
|
|
@ -39,7 +39,7 @@ Services for Razor components are added by calling <xref:Microsoft.Extensions.De
|
|||
|
||||
Component builder extensions:
|
||||
|
||||
* <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A> adds services to support rendering interactive server components.
|
||||
* <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A> adds services to support rendering interactive server components.
|
||||
* `AddWebAssemblyComponents` adds services to support rendering interactive WebAssembly components.
|
||||
|
||||
<!-- UPDATE 8.0 HOLD
|
||||
|
@ -50,7 +50,7 @@ Component builder extensions:
|
|||
|
||||
Endpoint convention builder extensions:
|
||||
|
||||
* <xref:Microsoft.AspNetCore.Builder.RazorComponentEndpointConventionBuilder.AddServerRenderMode%2A> configures the Server render mode for the app.
|
||||
* <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder.AddServerRenderMode%2A> configures the Server render mode for the app.
|
||||
* `AddWebAssemblyRenderMode` configures the WebAssembly render mode for the app.
|
||||
|
||||
<!-- UPDATE 8.0 HOLD
|
||||
|
|
|
@ -148,7 +148,7 @@ Configure the circuit with the <xref:Microsoft.AspNetCore.Components.Server.Circ
|
|||
|
||||
:::moniker range=">= aspnetcore-8.0"
|
||||
|
||||
Configure the options in the `Program` file with an options delegate to <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A>. The following example assigns the default option values shown in the preceding table. Confirm that the `Program` file uses the <xref:System> namespace (`using System;`).
|
||||
Configure the options in the `Program` file with an options delegate to <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A>. The following example assigns the default option values shown in the preceding table. Confirm that the `Program` file uses the <xref:System> namespace (`using System;`).
|
||||
|
||||
In the `Program` file:
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ For more information, see <xref:blazor/components/render-modes>.
|
|||
* `wwwroot` folder: The [Web Root](xref:fundamentals/index#web-root) folder for the server project containing the app's public static assets.
|
||||
|
||||
* `Program.cs` file: The server project's entry point that sets up the ASP.NET Core web application [host](xref:fundamentals/host/generic-host#host-definition) and contains the app's startup logic, including service registrations, configuration, logging, and request processing pipeline.
|
||||
* Services for Razor components are added by calling <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>. <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsBuilderExtensions.AddServerComponents%2A> adds services to support rendering interactive server components.
|
||||
* <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> discovers available components and specifies the root component for the app, which by default is the `App` component (`App.razor`). <xref:Microsoft.AspNetCore.Builder.RazorComponentEndpointConventionBuilder.AddServerRenderMode%2A> configures the Server render mode for the app.
|
||||
* Services for Razor components are added by calling <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>. <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddServerComponents%2A> adds services to support rendering interactive server components.
|
||||
* <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> discovers available components and specifies the root component for the app, which by default is the `App` component (`App.razor`). <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointConventionBuilder.AddServerRenderMode%2A> configures the Server render mode for the app.
|
||||
|
||||
* App settings files (`appsettings.Development.json`, `appsettings.json`): Provide [configuration settings](xref:blazor/fundamentals/configuration) for the server project.
|
||||
|
||||
|
|
Loading…
Reference in New Issue