fix(commons): resolve Commons-008 — replace ValueTuple in SetConnectionBindingsCommand with named ConnectionBinding record (CLI, ManagementService, TemplateEngine, CentralUI)

This commit is contained in:
Joseph Doherty
2026-05-16 23:54:31 -04:00
parent c583598888
commit b1f4251d75
8 changed files with 97 additions and 23 deletions

View File

@@ -73,7 +73,7 @@ public static class InstanceCommands
/// </summary>
internal static bool TryParseBindings(
string json,
out List<(string, int)>? bindings,
out List<ConnectionBinding>? bindings,
out string? error)
{
bindings = null;
@@ -88,7 +88,7 @@ public static class InstanceCommands
return false;
}
var result = new List<(string, int)>(pairs.Count);
var result = new List<ConnectionBinding>(pairs.Count);
foreach (var pair in pairs)
{
if (pair.Count != 2)
@@ -107,7 +107,7 @@ public static class InstanceCommands
error = "The second element of each binding (dataConnectionId) must be an integer.";
return false;
}
result.Add((pair[0].GetString()!, connectionId));
result.Add(new ConnectionBinding(pair[0].GetString()!, connectionId));
}
bindings = result;