Introduce methods in DependencyInjection.cs for configuring and using a global exception handler. Update the project file to include a reference to Microsoft.Extensions.Options. Modify GlobalExceptionHandlerMiddleware to accept IOptions<GlobalExceptionHandlerOptions> for enhanced configuration through dependency injection.
18 lines
466 B
XML
18 lines
466 B
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\DigitalData.Core.Exceptions\DigitalData.Core.Exceptions.csproj" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|