[Release/5.0-preview6] Expose ReferenceResolver and rename ReferenceHandling to ReferenceHandler #37296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Port of #36829 to preview6.
Description from original PR (click to view)
Address the following as it was detailed in #30820 (comment):
ReferenceHandlingto resemble a class.ReferenceResolverclass.ReferenceHandler<T> where T : ReferenceResolverto allow users to safely provide their own resolver implementation that will be instantiated on each call to (De)Serialize.ReferenceHandlerabstract so if you override it you can opt-in for using a persistent resolver.This PR effectively closes #30820 as no more changes would be pending to address.
Customer Impact
This allow users to try out the latest shape of the
ReferenceHandlerAPI and give preview customers an early notice that their code using the feature needs to be updated since it is a breaking change between previews.Risk
Code has been tested but it is a breaking change between previews.