=== 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:
@@ -8,6 +8,7 @@ namespace adas_core.Domain.Utils;
|
||||
/// <summary>
|
||||
/// Provides a sealed implementation of mapping utilities, serving as the concrete type for the <see cref="IMappingUtils"/> contract.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=3654eb4 -->
|
||||
public sealed class MappingUtils : IMappingUtils
|
||||
{
|
||||
private readonly List<MappingInterventions>? _cccData;
|
||||
@@ -139,6 +140,7 @@ public sealed class MappingUtils : IMappingUtils
|
||||
/// <param name="name">The name of the entry to look up in the CCC data.</param>
|
||||
/// <param name="peso">Optional weight used to select the matching range when multiple values are defined; when null, range-based lookup is skipped.</param>
|
||||
/// <returns>The matched initial value (for single-entry entries) or the contributed value (for range-based entries); returns 0 if the name is not found or no data is available.</returns>
|
||||
/// <!-- aidoc:v1 sig=ebd2665 body=cd6536d -->
|
||||
public int GetComplexityValue(string name, double? peso = null)
|
||||
{
|
||||
ConvertStringToDoubleInMapping();
|
||||
@@ -167,6 +169,7 @@ public sealed class MappingUtils : IMappingUtils
|
||||
/// <summary>
|
||||
/// Converts string representations of numeric values in the <c>_cccData</c> mapping to <see cref="double"/> using the invariant culture, ensuring the period (".") is recognized as the decimal separator. The method only runs when the data has not already been transformed (<c>_isTransformedValue</c> is false) and when <c>_cccData</c> is not null, iterating through each mapping's <c>Codes</c> and <c>Value</c> entries to parse and replace their <c>InitialValue</c> and <c>FinalValue</c> when they are strings. After processing, it marks the transformation as completed by setting <c>_isTransformedValue</c> to true.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=c56c099 body=08add6b -->
|
||||
private void ConvertStringToDoubleInMapping()
|
||||
{
|
||||
// esto es para garantizar que el punto (".") sea reconocido como separador decimal
|
||||
|
||||
Reference in New Issue
Block a user