* [tools] Extract the logic to parse OSPlatformAttribute platform names to a separate file/class.
* [introspection] Migrate .NET code to use the new .NET-style availability attributes.
This also means using the 'ApplePlatform' enum instead of the 'PlatformName'
enum, because the latter will be removed in .NET.
* [FileProvider] Exclude some deprecated API from .NET.
* [AVFoundation] Adjust availability attribute for AVCaptureStillImageOutput.HighResolutionStillImageOutputEnabled.
* Update tests.
* Share the logic for .NET between all platforms.
* This means adding a macOS variation of introspection for .NET.
* A few fixes to make sure the macOS variation passes:
* Make NSTabViewController.SegmentedControl fully unavailable (it's never
been in any stable version of Xcode).
* Treat API with an Obsolete attribute as API with an Obsoleted attribute
with regards to availability.
* Ignore OSPlatform attributes we don't understand.
* Ignore the ApiAvailabilityTest.LegacyAttributes test on macOS as well.
Otherwise a `[SupportedOSPlatformAttribute ("ios12,3")]` (should be a
dot, not a comma) would throw a `NullReferenceException` making it
harder to track down the error
This moves our current/legacy attributes to the ones added in dotnet 5 [1].
Short Forms (only in bindings)
| Old | New |
|---------------------------------------|-------------------------------------|
| [iOS (7,0)] | [SupportedOSPlatform ("ios7.0")] |
| [NoIOS] | [UnsupportedOSPlatform ("ios")] |
Long Forms
| Old | New |
|---------------------------------------|-------------------------------------|
| [Introduced (PlatformName.iOS, 7,0)] | [SupportedOSPlatform ("ios7.0")] |
| [Obsoleted (PlatformName.iOS, 12,1)] | [Obsolete (...)] |
| [Deprecated (PlatformName.iOS, 14,3)] | [UnsupportedOSPlatform ("ios14.3")] |
| [Unavailable (PlatformName.iOS)] | [UnsupportedOSPlatform ("ios")] |
Other changes
* `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]` are not allowed on `interface` [2] which means they cannot be used for protocols. This is currently handled by inlining the existing attributes on all members.
* `[ObsoletedInOSPlatform]` was removed in net5 RC. This PR is now mapping the existing attributes to `[Obsolote]`, however multiple ones cannot be added so they need to be platform specific.
Remaining work (manual bindings update) tracked in https://github.com/xamarin/xamarin-macios/issues/11055
References
* [1] https://github.com/xamarin/xamarin-macios/issues/10170
* [2] https://github.com/dotnet/runtime/issues/47599
* [3] https://github.com/dotnet/runtime/issues/47601
* [tests] Add 'link all' test for XM.
* [tests] Add 'link sdk' test for XM.
* [tests] Move dontlink-mac tests to linker-mac directory to have the same directory layout as linker-ios.