Skip to content

Commit

Permalink
Merge pull request dotnet#31718 from hakenr/dependency-injection-miss…
Browse files Browse the repository at this point in the history
…ing-bullets

Dependency Injection - formatting fix (missing bullets)
  • Loading branch information
Rick-Anderson committed Feb 7, 2024
2 parents 1e96752 + 09a2c46 commit c8b8f87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aspnetcore/blazor/fundamentals/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ Even in client-side Blazor apps that don't operate over a circuit, services regi
> [!NOTE]
> To detect disposable transient services in an app, see the following sections later in this article:
>
> [Detect client-side transient disposables](#detect-client-side-transient-disposables)
> [Detect server-side transient disposables](#detect-server-side-transient-disposables)
> * [Detect client-side transient disposables](#detect-client-side-transient-disposables)
> * [Detect server-side transient disposables](#detect-server-side-transient-disposables)
An approach that limits a service lifetime is use of the <xref:Microsoft.AspNetCore.Components.OwningComponentBase> type. <xref:Microsoft.AspNetCore.Components.OwningComponentBase> is an abstract type derived from <xref:Microsoft.AspNetCore.Components.ComponentBase> that creates a DI scope corresponding to the *lifetime of the component*. Using this scope, it's possible to use DI services with a scoped lifetime and have them live as long as the component. When the component is destroyed, services from the component's scoped service provider are disposed as well. This can be useful for services that:

Expand Down

0 comments on commit c8b8f87

Please sign in to comment.