Add TypeForwarders from Xamarin.AndroidX.SavedState to Xamarin.AndroidX.SavedState.SavedState.Android #1183
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.

This PR adds C# type forwarders to improve API compatibility between the
Xamarin.AndroidX.SavedStateandXamarin.AndroidX.SavedState.SavedState.Androidpackages.Changes Made
Created
source/androidx.savedstate/savedstate/Additions/TypeForwarders.cswith type forwards for the following types fromXamarin.AndroidX.SavedStatetoXamarin.AndroidX.SavedState.SavedState.Android:AndroidX.SavedState.ISavedStateRegistryOwnerAndroidX.SavedState.SavedStateRegistryAndroidX.SavedState.SavedStateRegistryControllerAndroidX.SavedState.ViewTreeSavedStateRegistryOwnerTechnical Details
The implementation follows the established pattern used in other AndroidX projects (such as
androidx.lifecycle/lifecycle-viewmodel/Additions/TypeForwards.cs). The type forwarders use theSystem.Runtime.CompilerServices.TypeForwardedToAttributeto redirect type resolution from thesavedstateassembly to thesavedstate-androidassembly where the actual implementations reside.The project reference from
savedstatetosavedstate-androidalready exists in the generated project file, ensuring proper compilation and type resolution.Verification
Fixes #1182.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.