Kommentare zur Dokumentation hinzugefügt und Pakete konfiguriert.

This commit is contained in:
Developer 02
2024-06-20 16:20:50 +02:00
parent b7584a1632
commit 0ad92e7592
19 changed files with 588 additions and 56 deletions

View File

@@ -4,8 +4,19 @@ using System.Configuration;
namespace DigitalData.Core.DTO
{
/// <summary>
/// Provides extension methods for dependency injection.
/// </summary>
public static class DIExtensions
{
/// <summary>
/// Adds the <see cref="CookieConsentSettings"/> to the service collection.
/// </summary>
/// <param name="services">The service collection to add the settings to.</param>
/// <returns>The updated service collection.</returns>
/// <exception cref="ConfigurationErrorsException">
/// Thrown if the 'CookieConsentSettings' section is missing or improperly configured in appsettings.json.
/// </exception>
public static IServiceCollection AddCookieConsentSettings(this IServiceCollection services)
{
services.AddSingleton(sp =>
@@ -19,4 +30,4 @@ namespace DigitalData.Core.DTO
return services;
}
}
}
}