You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add "type forwarders" from Xamarin.AndroidX.SavedState to Xamarin.AndroidX.SavedState.SavedState.Android (#1183)
Context: https://learn.microsoft.com/dotnet/standard/assembly/type-forwardingFixes: #1182
Related: #1177
This PR adds C# type forwarders to improve API compatibility between
the `Xamarin.AndroidX.SavedState` and
`Xamarin.AndroidX.SavedState.SavedState.Android` packages.
## Changes Made
Created
`source/androidx.savedstate/savedstate/Additions/TypeForwarders.cs`
with type forwards for the following types from
`Xamarin.AndroidX.SavedState` to
`Xamarin.AndroidX.SavedState.SavedState.Android`:
- `AndroidX.SavedState.ISavedStateRegistryOwner`
- `AndroidX.SavedState.SavedStateRegistry`
- `AndroidX.SavedState.SavedStateRegistryController`
- `AndroidX.SavedState.ViewTreeSavedStateRegistryOwner`
## Technical 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 the
`System.Runtime.CompilerServices.TypeForwardedToAttribute` to redirect
type resolution from the `savedstate` assembly to the
`savedstate-android` assembly where the actual implementations reside.
The project reference from `savedstate` to `savedstate-android`
already exists in the generated project file, ensuring proper
compilation and type resolution.
0 commit comments