-
Notifications
You must be signed in to change notification settings - Fork 520
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
Labels
dotnet
An issue or pull request related to .NET (6)
enhancement
The issue or pull request is an enhancement
Milestone
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: to: [ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")] (and removing the |
chamons
added a commit
to chamons/xamarin-macios
that referenced
this issue
Sep 12, 2022
chamons
added a commit
to chamons/xamarin-macios
that referenced
this issue
Sep 13, 2022
…to use 'ObsoletedOSPlatform' - Part of dotnet#15849
chamons
added a commit
that referenced
this issue
Oct 6, 2022
…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! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
dotnet
An issue or pull request related to .NET (6)
enhancement
The issue or pull request is an enhancement
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: