review(Driver.TwinCAT.Contracts): first review; fix ReadArrayLength doc

First review at 7286d320. -001 (Low): ReadArrayLength doc corrected (positive int32 via
TryGetInt32, not uint). -002 (Structure datatype doc) Open. Consistent with the sibling
Driver.TwinCAT-017 ArrayLength flow.
This commit is contained in:
Joseph Doherty
2026-06-19 12:22:53 -04:00
parent 5d01271f03
commit 0c1d5f7f88
2 changed files with 116 additions and 3 deletions
@@ -53,9 +53,11 @@ public static class TwinCATEquipmentTagParser
? e.GetString() ?? "" : "";
/// <summary>
/// Reads the optional 1-D array length: <c>arrayLength</c> (a positive uint) honoured ONLY
/// when <c>isArray</c> is the JSON literal <c>true</c>. Returns <c>null</c> (scalar) when
/// isArray is absent/false, when arrayLength is absent / non-numeric / zero / negative.
/// Reads the optional 1-D array length: <c>arrayLength</c> (a positive int32; values above
/// <see cref="int.MaxValue"/> are treated as absent/scalar) honoured ONLY when <c>isArray</c>
/// is the JSON literal <c>true</c>. Returns <c>null</c> (scalar) when isArray is absent/false,
/// when arrayLength is absent / non-numeric / zero / negative / greater than
/// <see cref="int.MaxValue"/>.
/// </summary>
private static int? ReadArrayLength(JsonElement o)
{