[NET 6 Attribute Conversion] Intents (#13948)

This commit is contained in:
Chris Hamons 2022-02-02 10:57:19 -06:00 коммит произвёл GitHub
Родитель 363e58f079
Коммит aa1ccff2c4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 61 добавлений и 21 удалений

Просмотреть файл

@ -19,6 +19,8 @@ using NativeHandle = System.IntPtr;
namespace Intents {
#if NET
[SupportedOSPlatform ("ios10.0")]
[SupportedOSPlatform ("macos10.12")]
[SupportedOSPlatform ("tvos14.0")]
#else
[iOS (10, 0)]
@ -58,16 +60,22 @@ namespace Intents {
#if NET
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("tvos14.0")]
#else
[Watch (6,0), iOS (13,0), Mac (11,0)]
[Watch (6,0)]
[iOS (13,0)]
[Mac (11,0)]
#endif
public static INIntentResolutionResult GetUnsupported (nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method");
#if NET
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("tvos14.0")]
#else
[Watch (6,0), iOS (13,0), Mac (11,0)]
[Watch (6,0)]
[iOS (13,0)]
[Mac (11,0)]
#endif
public static INIntentResolutionResult GetConfirmationRequired (NSObject itemToConfirm, nint reason) => throw new NotImplementedException ("All subclasses of INIntentResolutionResult must re-implement this method");

Просмотреть файл

@ -13,40 +13,42 @@ namespace Intents
public partial class INPerson
{
#if !NET
#if NET
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#else
[Introduced (PlatformName.iOS, 15,0)]
[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
#endif
public enum INPersonType {
Me = 0,
ContactSuggestion = 1,
}
#if !NET
#if NET
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[Introduced (PlatformName.iOS, 15,0)]
[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
#endif
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType) :
this (personHandle, nameComponents, displayName, image, contactIdentifier, customIdentifier, isMe, suggestionType, INPersonType.Me)
{
}
#if !NET
#if NET
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[Introduced (PlatformName.iOS, 15,0)]
[Introduced (PlatformName.MacOSX, 12,0)]
[Introduced (PlatformName.WatchOS, 8,0)]
#else
[SupportedOSPlatform ("ios15.0")]
[SupportedOSPlatform ("macos12.0")]
#endif //!NET
#endif
public INPerson (INPersonHandle personHandle, NSPersonNameComponents? nameComponents, string? displayName, INImage? image, string? contactIdentifier, string? customIdentifier, bool isMe, INPersonSuggestionType suggestionType, INPersonType personType) : base (NSObjectFlag.Empty)
{
switch (personType) {

Просмотреть файл

@ -1,5 +1,5 @@
#if IOS
using System;
using System.Runtime.Versioning;
using Foundation;
using Intents;
@ -10,7 +10,13 @@ namespace Intents {
public partial class INSetClimateSettingsInCarIntent {
#if NET
[SupportedOSPlatform ("ios10.0")]
[UnsupportedOSPlatform ("ios12.0")]
#if IOS
[Obsolete ("Starting with ios12.0 use the overload that takes 'INSpeakableString carName'.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
#endif

Просмотреть файл

@ -1,5 +1,5 @@
#if IOS
using System;
using System.Runtime.Versioning;
using Foundation;
using Intents;
@ -10,7 +10,13 @@ namespace Intents {
public partial class INSetDefrosterSettingsInCarIntent {
#if NET
[SupportedOSPlatform ("ios10.0")]
[UnsupportedOSPlatform ("ios12.0")]
#if IOS
[Obsolete ("Starting with ios12.0 use the overload that takes 'INSpeakableString carName'.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
#endif

Просмотреть файл

@ -1,5 +1,5 @@
#if IOS
using System;
using System.Runtime.Versioning;
using Foundation;
using Intents;
@ -11,7 +11,13 @@ namespace Intents {
public partial class INSetProfileInCarIntent {
#if NET
[SupportedOSPlatform ("ios10.0")]
[UnsupportedOSPlatform ("ios12.0")]
#if IOS
[Obsolete ("Starting with ios12.0 use the overload that takes 'INSpeakableString carName'.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
#endif
@ -21,7 +27,13 @@ namespace Intents {
}
#if NET
[SupportedOSPlatform ("ios10.0")]
[UnsupportedOSPlatform ("ios12.0")]
#if IOS
[Obsolete ("Starting with ios12.0 use the overload that takes 'INSpeakableString carName'.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
#endif

Просмотреть файл

@ -1,5 +1,5 @@
#if IOS
using System;
using System.Runtime.Versioning;
using Foundation;
using Intents;
@ -10,7 +10,13 @@ namespace Intents {
public partial class INSetSeatSettingsInCarIntent {
#if NET
[SupportedOSPlatform ("ios10.0")]
[UnsupportedOSPlatform ("ios12.0")]
#if IOS
[Obsolete ("Starting with ios12.0 use the overload that takes 'INSpeakableString carName'.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
#endif
[UnsupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
#else
[Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")]
#endif