fix(commons): resolve Commons-008 — replace ValueTuple in SetConnectionBindingsCommand with named ConnectionBinding record (CLI, ManagementService, TemplateEngine, CentralUI)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user