Closed MetaFight closed 2 weeks ago
I can't figure out why git thinks the entirety of the unit test file has changed. I've tried switching the line endings but I think in doing that (amending the commit and using push --force
) I broke the CI build.
I'll have some time tomorrow to try and fix this.
The reason the CI failed is your branch name, when the PR branch is master the build fails.
I'm abandoning this PR because of the branch name issue. I'll create a new one with a better branch name.
Resolves #933
The
ArrayNodeDeserializer
delegates the deserialization of elements to theCollectionNodeDeserializer.DeserializeHelper
. This, in turn, handles circular references by relying on theIValuePromise.ValueAvailable
event to write all the resolved references to itsIList result
parameter.However, because
ArrayNodeDeserializer
doesn't know the size of its resulting array beforehand, it uses a temporaryArrayList
which it passes toCollectionNodeDeserializer.DeserializeHelper
. As a result, all resolved ValuePromise values are written to the temporaryArrayList
instead of the finalArray
.This PR fixes this by adding an optional
Action<int, object?>? promiseResolvedHandler
toCollectionNodeDeserializer.DeserializeHelper
. When provided, it is used when ValuePromises are resolved. Otherwise, the existing behaviour is preserved.