=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
@@ -14,6 +14,8 @@ namespace adas_core.Infrastructure.Repositories;
/// Represents a MongoDB-backed repository for <see cref="PoCSettings"/> entities, implementing the <see cref="IPoCSettingsRepository"/> contract to provide data access operations.
/// </summary>
/// <typeparam name="PoCSettings">The type of the settings entity managed by the repository.</typeparam>
/// <!-- aidoc-review:v1 severity=medium kind=extra_param
/// "PoCSettings is not a type parameter of PoCSettingsRepository; it is a generic type argument supplied to MongoRepository. The <typeparam> tag is incorrect." -->
public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsRepository
{
private readonly ApiSettings _apiSettings;
@@ -36,6 +38,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// Retrieves the collection name used for Proof of Concept (PoC) settings, returning the value from the API settings or the default "poc_settings" when no value is configured.
/// </summary>
/// <returns>The configured PoC settings collection name, or "poc_settings" as a fallback when <c>_apiSettings.PoCSettings</c> is null.</returns>
/// <!-- aidoc:v1 sig=94e22ff body=1916b20 -->
public override string GetCollectionName()
{
return _apiSettings.PoCSettings ?? "poc_settings";
@@ -45,6 +48,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// Deletes the PoCSettings document matching the specified identifier from the collection.
/// </summary>
/// <param name="id">The unique identifier of the PoCSettings document to delete.</param>
/// <!-- aidoc:v1 sig=3de1ad6 body=24b7498 -->
public async Task Delete(ObjectId id)
{
try
@@ -64,6 +68,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// If an error occurs during the retrieval, the exception is logged and an empty list is returned as a fallback.
/// </summary>
/// <returns>A task that represents the asynchronous operation. The task result contains a list of all PoCSettings records, or an empty list if an error occurs.</returns>
/// <!-- aidoc:v1 sig=6810f78 body=f98d2ca -->
public async Task<List<PoCSettings>> FindAll()
{
try
@@ -84,6 +89,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// </summary>
/// <param name="id">The <see cref="ObjectId"/> used to locate the PoCSettings document.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the matching <see cref="PoCSettings"/> or <c>null</c> if not found.</returns>
/// <!-- aidoc:v1 sig=de8c390 body=645f4b0 -->
public async Task<PoCSettings?> FindById(ObjectId id)
{
try
@@ -105,6 +111,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// </summary>
/// <param name="location">The patient location provided as search criteria. Detailed attribute-based filtering by location fields is currently commented out.</param>
/// <returns>The first matching PoCSettings record, or null if no record is found.</returns>
/// <!-- aidoc:v1 sig=d3a4d30 body=e565bd9 -->
public async Task<PoCSettings?> FindByLocation(PatientLocation location)
{
try
@@ -137,6 +144,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// Updates the existing PoC (Proof of Concept) settings asynchronously. If the update fails, the exception is logged and rethrown to the caller.
/// </summary>
/// <param name="pocSettings">The PoC settings entity to be updated, identified by its <c>Id</c>.</param>
/// <!-- aidoc:v1 sig=944ba55 body=9a9ca83 -->
public async Task Update(PoCSettings pocSettings)
{
try
@@ -153,6 +161,7 @@ public class PoCSettingsRepository : MongoRepository<PoCSettings>, IPoCSettingsR
/// <summary>
/// Creates the MongoDB indexes required for the <see cref="PoCSettings"/> collection, applying non-unique background indexing on the <c>patientLocation</c> field.
/// </summary>
/// <!-- aidoc:v1 sig=4955da2 body=b65c045 -->
public override async Task CreateIndexes()
{
var options = new CreateIndexOptions { Background = true, Unique = false };