feat(AnnotationParams): Hinzufügen der Eigenschaft AnnotationDictionary, um Anmerkungen in Form eines Wörterbuchs zu speichern.
This commit is contained in:
parent
fb0022bd2c
commit
db5a2a8640
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user