-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make use of the new ObsoletedOSPlatformAttribute in .NET 7 #15849
Comments
So looking at this, I think there are two major parts, one very cheap and one that will require some manual work:
|
BTW this needs to target the |
I think 2. should be fairly easy to grep for: $ git grep Obsolete.*Starting
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveInterruption' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveInterruption' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
src/AVFoundation/Events.cs: [Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
... and the change would be to change this: xamarin-macios/src/AVFoundation/Events.cs Lines 369 to 371 in aa8ded8
to: [ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")] (and removing the |
…to use 'ObsoletedOSPlatform' - Part of xamarin#15849
…15941) - Part of #15849 - A bit of dead code was removed while I was reviewing things. Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
I believe this is all complete! |
Ref: dotnet/runtime#68557
Note that the attribute was renamed after it was added, to
ObsoletedOSPlatformAttribute
(dotnet/runtime#72970)I think our change is mostly changing our
[Obsolete (...)]
attributes for .NET to use the newObsoletedOSPlatform [...]
attribute.We should also likely document how we map Apple's availability attributes to .NET's availability attributes, because it's not entirely obvious:
Additionally we should use the new Message property on the
UnsupportedOSPlatform
attribute (instead of using anObsolete
attribute to give this information).The text was updated successfully, but these errors were encountered: