Skip to content

Commit

Permalink
Semi-manually update all 'Starting with VERSION' Obsolete attributes …
Browse files Browse the repository at this point in the history
…to use 'ObsoletedOSPlatform' (#15953)

- Part of #15849
- These were done with a few vim macros and some manual edits, so
mistakes are possibly but new typos are less likely.
  • Loading branch information
chamons authored Sep 20, 2022
1 parent 9a8a07d commit a405564
Show file tree
Hide file tree
Showing 81 changed files with 657 additions and 1,633 deletions.
28 changes: 7 additions & 21 deletions src/AVFoundation/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,7 @@ InternalAVAudioSessionDelegate EnsureEventDelegate ()
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveInterruption' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")]
#endif
Expand All @@ -388,9 +386,7 @@ public event EventHandler BeginInterruption {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveInterruption' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveInterruption' instead.")]
#endif
Expand All @@ -410,9 +406,7 @@ public event EventHandler EndInterruption {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#endif
Expand All @@ -432,9 +426,7 @@ public event EventHandler<AVCategoryEventArgs> CategoryChanged {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#endif
Expand All @@ -454,9 +446,7 @@ public event EventHandler<AVStatusEventArgs> InputAvailabilityChanged {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#endif
Expand All @@ -477,9 +467,7 @@ public event EventHandler<AVSampleRateEventArgs> SampleRateChanged {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#endif
Expand All @@ -500,9 +488,7 @@ public event EventHandler<AVChannelsEventArgs> InputChannelsChanged {
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("ios6.0")]
#if IOS
[Obsolete ("Starting with ios6.0 use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("ios6.0", "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#else
[Deprecated (PlatformName.iOS, 6,0, message: "Use 'AVAudioSession.Notification.ObserveAudioRouteChange' instead.")]
#endif
Expand Down
21 changes: 6 additions & 15 deletions src/AddressBook/ABAddressBook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ namespace AddressBook {
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -119,11 +116,8 @@ static InitConstants ()
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand All @@ -142,11 +136,8 @@ public class ABAddressBook : NativeObject, IEnumerable<ABRecord> {
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios6.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios6.0 use the static Create method instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios6.0", "Use the static Create method instead.")]
#else
[Deprecated (PlatformName.iOS, 6, 0, message : "Use the static Create method instead")]
#endif
Expand Down
7 changes: 2 additions & 5 deletions src/AddressBook/ABGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ internal static void Init ()
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down
49 changes: 14 additions & 35 deletions src/AddressBook/ABMultiValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ namespace AddressBook {
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9,0)]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -118,11 +115,8 @@ static class ABMultiValue {
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -203,11 +197,8 @@ public int Identifier {
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -303,11 +294,8 @@ public ABMutableMultiValue<T> ToMutableMultiValue ()
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down Expand Up @@ -360,11 +348,8 @@ public bool RemoveAt (nint index)
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand All @@ -381,11 +366,8 @@ public ABMutableDateMultiValue ()
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand All @@ -402,11 +384,8 @@ public ABMutableDictionaryMultiValue ()
[SupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios9.0")]
#if __MACCATALYST__
[Obsolete ("Starting with maccatalyst14.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[ObsoletedOSPlatform ("maccatalyst14.0", "Use the 'Contacts' API instead.")]
[ObsoletedOSPlatform ("ios9.0", "Use the 'Contacts' API instead.")]
#else
[Deprecated (PlatformName.iOS, 9, 0, message : "Use the 'Contacts' API instead.")]
[Introduced (PlatformName.MacCatalyst, 14, 0)]
Expand Down
Loading

5 comments on commit a405564

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.