aaubry / YamlDotNet

YamlDotNet is a .NET library for YAML
MIT License
2.48k stars 466 forks source link

Make the type converters available to custom pre-processing phase visitors. #895

Closed stijnherreman closed 5 months ago

stijnherreman commented 5 months ago

This change makes the type converters available to custom pre-processing phase visitors instead of discarding them. The type converters are necessary when inheriting from PreProcessingPhaseObjectGraphVisitorSkeleton.

The change also aligns the WithPreProcessingPhaseObjectGraphVisitor(...) API with the WithEmissionPhaseObjectGraphVisitor(...) API.

Fixes #677

There are currently no unit tests at all for this API, but I can add one if required. I'm already using this change locally to implement a custom anchor assigning visitor (see #807).

EdwardCooke commented 5 months ago

I'm fine pushing in another breaking change in the next version, there's already going to be a couple. However, can you just add method overloads to incorporate your changes?

stijnherreman commented 5 months ago

Sure, either is fine with me. I've updated the PR to add overloads instead of replacing the existing ones.

aaubry commented 5 months ago

This feature has been released in version 15.1.0.