Fix serialization scrub/convert bugs and reduce per-value scrubbing allocations
Merged
SI
5mo ago+242+242+012345678901234567890123456789-51-51-01234567890123456789
- Static ScrubMembers/ScrubMember/ScrubMembers(Type,names) now scrub instead of ignore (they delegated to Ignore*, silently removing the member rather than rendering it as {Scrubbed})
- VerifyJsonWriter: only apply the remove/newline-prefix trick for a multiline string in property position; in array position write the value directly so the ',' delimiter between items is preserved
- SerializationSettings copy constructor now copies OrderDictionaries, so DontSortDictionaries survives a per-test settings clone
- GetMemberConverter keeps iterating on a name miss instead of returning null from the first assignable type
- TupleConverter: iterate the flattened ITuple length so fully-named 8+ element tuples work, and reject nested named tuples with a clear message
- NumericId scrubbing keys on the value's invariant string instead of Convert.ToInt64, avoiding OverflowException for ulong/decimal/double/NaN and no longer collapsing distinct fractional values
- ApplyForPropertyValue fast-paths values that cannot change (no scrubbers, no '\r', shorter than the shortest replacement) to avoid the StringBuilder round-trip and directory-replacement scan; FindMatches bails when the builder is shorter than the shortest pair
- Cache the ImmutableArray IsDefaultOrEmpty getter per type; use StringComparison.Ordinal in collection detection
- Add tests for the above