feat(AnnotationParams): Hinzufügen der Eigenschaft AnnotationDictionary, um Anmerkungen in Form eines Wörterbuchs zu speichern.

This commit is contained in:
Developer 02 2025-03-26 10:42:34 +01:00
parent fb0022bd2c
commit db5a2a8640
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,4 @@
using AngleSharp.Common;
using EnvelopeGenerator.Web.Models;
using EnvelopeGenerator.Web.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
@ -19,6 +18,6 @@ public class ConfigController : ControllerBase
[HttpGet("Annotations")]
public IActionResult GetAnnotationParams()
{
return Ok(_annotParams.Annotations.ToDictionary(a => a.Name.ToLower(), a => a));
return Ok(_annotParams.AnnotationDictionary);
}
}

View File

@ -48,6 +48,10 @@ public class AnnotationParams
throw new InvalidOperationException($"{verBoundAnnotName} added as bound anotation. However, it is not defined.");
#endregion
}
AnnotationDictionary = _annots.ToDictionary(a => a.Name.ToLower(), a => a);
}
}
public Dictionary<string, Annotation> AnnotationDictionary { get; private init; } = new();
}