Files
lmxopcua/tests/Core/ZB.MOM.WW.OtOpcUa.Core.Scripting.Tests
Joseph Doherty 61546d5aab fix(scripting): #1092 a returned concrete collection (List<T>, HashSet<T>, ...) is materialised into the same typed array in both runners
ScriptResultMaterializer returned a non-array ICollection as-is (capped by Count only), so
in process the host got the List<double> itself while the out-of-process worker, whose wire
carries arrays but no collection type, answered "unsupported type" for the same script.
Every non-array, non-string sequence now goes through the one materialisation: a collection
is held to Scripting:MaxResultElements by its Count before it is copied, then becomes T[]
of its IEnumerable<T> element type; an open element type (List<object>, List<List<int>>) or
none (ArrayList) is refused like the lazy equivalent. Both runners give double[] for a
List<double>.

ParityTests.Result_materialisation_and_the_element_cap_agree gains list / at-cap / over-cap
/ hash set / queue / List<object> / nested-list rows plus a positive control (6 rows + the
control fail against the old materializer). ContainmentTests' "unsupported result type"
example moves from List<int> (now int[]) to KeyValuePair<int,int>.

Behaviour change: a script returning List<object> (or another open element type) now fails
the run (Bad + script log) in process too, as the lazy form already did.
2026-12-04 15:14:16 -05:00
..