Skip to content
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

[release/6.0.3xx] [NET Attribute Conversion][generator] Generate NET style attributes #14877

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ARKit/ARSkeleton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public partial class ARSkeleton {

#if NET
[SupportedOSPlatform ("ios14.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#else
[iOS (14,0)]
#endif
Expand All @@ -20,6 +21,7 @@ public partial class ARSkeleton {

#if NET
[SupportedOSPlatform ("ios14.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#else
[iOS (14,0)]
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/AVFoundation/AVCaptureVideoPreviewLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public enum InitMode {
WithConnection,
#if NET
[SupportedOSPlatform ("ios8.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("maccatalyst")]
#else
[iOS (8,0)]
#endif
Expand Down
7 changes: 1 addition & 6 deletions src/AVFoundation/AVTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,6 @@ public override int GetHashCode ()
}
}

#if NET
[SupportedOSPlatform ("ios8.0")]
[SupportedOSPlatform ("macos10.10")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
#endif
#if !COREBUILD
public static partial class AVMetadataIdentifiers {
}
Expand Down Expand Up @@ -419,6 +413,7 @@ public struct AVSampleCursorChunkInfo {

#if NET
[SupportedOSPlatform ("macos10.15")]
[SupportedOSPlatform ("maccatalyst15.0")]
#else
[Mac (10,15)]
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/AVFoundation/AVVideoSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public double? MaxKeyFrameIntervalDuration {
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("macos")]
#else
[iOS (7,0)]
#endif
Expand All @@ -257,8 +257,8 @@ public bool? AllowFrameReordering {
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
#else
[iOS (7,0)]
#endif
Expand Down Expand Up @@ -300,8 +300,8 @@ public AVVideoH264EntropyMode? EntropyEncoding {
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
#else
[iOS (7,0)]
#endif
Expand All @@ -318,8 +318,8 @@ public float? ExpectedSourceFrameRate {
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
#else
[iOS (7,0)]
#endif
Expand Down
1 change: 1 addition & 0 deletions src/AVFoundation/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ public enum AVCaptureAutoFocusSystem : long {
[NoWatch]
[iOS (9, 0)]
[Native]
[NoMac]
public enum AVCaptureSessionInterruptionReason : long {
VideoDeviceNotAvailableInBackground = 1,
AudioDeviceInUseByAnotherClient = 2,
Expand Down
2 changes: 2 additions & 0 deletions src/AddressBook/ABPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace AddressBook {

#if NET
[UnsupportedOSPlatform ("ios9.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#if IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
Expand Down Expand Up @@ -251,6 +252,7 @@ internal static void Init ()

#if NET
[UnsupportedOSPlatform ("ios9.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#if IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
Expand Down
1 change: 1 addition & 0 deletions src/AddressBook/ABSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public ABSourceType SourceType {

#if NET
[UnsupportedOSPlatform ("ios9.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#if IOS
[Obsolete ("Starting with ios9.0 use the 'Contacts' API instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
Expand Down
1 change: 1 addition & 0 deletions src/AppKit/Defs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
namespace AppKit {
#if NET
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("maccatalyst")]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct NSEdgeInsets {
Expand Down
5 changes: 0 additions & 5 deletions src/AppKit/NSAccessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@

namespace AppKit
{
#if NET
[SupportedOSPlatform ("macos10.10")]
#else
[Mac (10,10)] // protocol added in 10.10
#endif
public partial interface INSAccessibility {}

#if NET
Expand Down
17 changes: 15 additions & 2 deletions src/AudioUnit/AUEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,20 @@ public enum AudioObjectPropertySelector : uint
TranslateUIDToBox = 1969841250, // 'uidb'
ClockDeviceList = 1668049699, //'clk#'
TranslateUidToClockDevice = 1969841251, // 'uidc',
#if XAMCORE_3_0
[NoiOS][NoTV]
#endif
[Deprecated (PlatformName.iOS, 15,0, message : "Use the 'ProcessIsMain' element instead.")]
[Deprecated (PlatformName.MacCatalyst, 15,0, message : "Use the 'ProcessIsMain' element instead.")]
[Deprecated (PlatformName.MacOSX, 12,0, message : "Use the 'ProcessIsMain' element instead.")]
[Obsolete ("Use the 'ProcessIsMain' element instead.")]
ProcessIsMaster = 1835103092, // 'mast'
[iOS (15,0), MacCatalyst (15,0), Mac (12,0), NoTV, NoWatch]
#if !XAMCORE_3_0
[iOS (15,0)]
#else
[NoiOS]
#endif
[MacCatalyst (15,0), Mac (12,0), NoTV, NoWatch]
ProcessIsMain = 1835100526, // 'main'
IsInitingOrExiting = 1768845172, // 'inot'
UserIDChanged = 1702193508, // 'euid'
Expand All @@ -208,7 +216,12 @@ public enum AudioObjectPropertySelector : uint
ActualSampleRate = 1634955892,// 'asrt',
ClockDevice = 1634755428, // 'apcd',
IOThreadOSWorkgroup = 1869838183, // 'oswg'
[iOS (15,0), MacCatalyst (15,0), Mac (12,0), NoTV, NoWatch]
#if !XAMCORE_3_0
[iOS (15,0)]
#else
[NoiOS]
#endif
[MacCatalyst (15,0), Mac (12,0), NoTV, NoWatch]
ProcessMute = 1634758765, // 'appm'
}

Expand Down
9 changes: 0 additions & 9 deletions src/AudioUnit/AUParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@

namespace AudioUnit
{
#if NET
[SupportedOSPlatform ("ios9.0")]
[SupportedOSPlatform ("macos10.11")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("tvos")]
#else
[iOS (9,0)]
[Mac (10,11)]
#endif
public partial class AUParameter
{
public string GetString (float? value)
Expand Down
12 changes: 6 additions & 6 deletions src/AudioUnit/AudioComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ public Version? Version {
#if !__MACCATALYST__
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos14.0")]
[UnsupportedOSPlatform ("ios14.0")]
#if TVOS
Expand All @@ -412,9 +412,9 @@ public Version? Version {

#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos14.0")]
[UnsupportedOSPlatform ("ios14.0")]
#if TVOS
Expand All @@ -436,11 +436,11 @@ public Version? Version {
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst14.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif __MACCATALYST__
Expand All @@ -461,11 +461,11 @@ public Version? Version {
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst14.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0 use 'AudioUnit' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif __MACCATALYST__
Expand Down
14 changes: 9 additions & 5 deletions src/AudioUnit/AudioComponentDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ public enum AudioTypeConverter { // OSType in AudioComponentDescription
#if NET
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("ios13.0")]
#if TVOS
Expand Down Expand Up @@ -210,10 +210,10 @@ public enum AudioTypeEffect { // OSType in AudioComponentDescription
#else
#if NET
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0 use 'AudioTypeEffect.GraphicEQ' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif IOS
Expand Down Expand Up @@ -248,10 +248,10 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription
#if MONOMAC
Stereo=0x736d7872, // 'smxr'
#if NET
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("ios")]
[UnsupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos10.10")]
#if MONOMAC
[Obsolete ("Starting with macos10.10 use 'Spacial' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
Expand All @@ -262,7 +262,11 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription
ThreeD=0x33646d78, // '3dmx'
#else
#if NET
[SupportedOSPlatform ("ios")]
[UnsupportedOSPlatform ("ios8.0")]
[UnsupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("macos")]
#if IOS
[Obsolete ("Starting with ios8.0 use 'Spacial' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
Expand Down
14 changes: 7 additions & 7 deletions src/AudioUnit/AudioUnit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,15 @@ public uint GetCurrentDevice (AudioUnitScopeType scope, uint audioUnitElement =
return device;
}

#if !XAMCORE_3_0 || MONOMAC
#if !MONOMAC
#if !XAMCORE_3_0 || MONOMAC || __MACCATALYST__
#if !MONOMAC && !__MACCATALYST__
[Obsolete ("This API is not available on iOS.")]
#endif
#if NET
[SupportedOSPlatform ("maccatalyst15.0")]
[SupportedOSPlatform ("ios")]
[UnsupportedOSPlatform ("ios")]
[UnsupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
#else
[MacCatalyst (15,0)]
#endif
Expand Down Expand Up @@ -748,11 +748,11 @@ static AudioUnitStatus InputCallbackImpl (IntPtr clientData, ref AudioUnitRender
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst14.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0 use 'AudioUnit' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif __MACCATALYST__
Expand Down Expand Up @@ -784,11 +784,11 @@ public AudioComponentStatus AudioOutputUnitPublish (AudioComponentDescription de
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst14.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif __MACCATALYST__
Expand All @@ -809,11 +809,11 @@ public AudioComponentStatus AudioOutputUnitPublish (AudioComponentDescription de
#if NET
[SupportedOSPlatform ("ios7.0")]
[SupportedOSPlatform ("maccatalyst14.0")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos")]
[UnsupportedOSPlatform ("tvos13.0")]
[UnsupportedOSPlatform ("maccatalyst14.0")]
[UnsupportedOSPlatform ("ios13.0")]
[UnsupportedOSPlatform ("macos")]
#if TVOS
[Obsolete ("Starting with tvos13.0 use 'AudioUnit' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif __MACCATALYST__
Expand Down
1 change: 1 addition & 0 deletions src/CFNetwork/CFHTTPMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public enum AuthenticationScheme {
[UnsupportedOSPlatform ("tvos12.0")]
[UnsupportedOSPlatform ("macos10.14")]
[UnsupportedOSPlatform ("ios12.0")]
[UnsupportedOSPlatform ("maccatalyst")]
#if TVOS
[Obsolete ("Starting with tvos12.0 not available anymore.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#elif MONOMAC
Expand Down
2 changes: 2 additions & 0 deletions src/Contacts/CNEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ public enum CNContactOptions : long {
NonGregorianBirthday = 1 << 8,
Note = 1 << 9,
#if !MONOMAC
[NoMac]
ImageData = 1 << 10,
#endif
ThumbnailImageData = 1 << 11,
#if !MONOMAC
[NoMac]
ImageDataAvailable = 1 << 12,
#endif
Type = 1 << 13,
Expand Down
Loading