[CloudKit] Adopt XAMCORE_4_0 changes in .NET. (#13891)
This commit is contained in:
Родитель
00647d50a5
Коммит
6564cfc0fc
|
@ -19,7 +19,7 @@ using NativeHandle = System.IntPtr;
|
|||
|
||||
namespace CloudKit {
|
||||
|
||||
#if !XAMCORE_4_0
|
||||
#if !NET
|
||||
public partial class CKQueryNotification {
|
||||
|
||||
[Obsolete ("Empty stub (not public API). Use 'DatabaseScope' instead.")]
|
||||
|
@ -27,33 +27,17 @@ namespace CloudKit {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !XAMCORE_4_0 && !WATCH
|
||||
#if !NET && !WATCH
|
||||
public partial class CKOperation {
|
||||
|
||||
#if !NET
|
||||
[Obsoleted (PlatformName.iOS, 9,3, message: "Do not use; this API was removed and will always return 0.")]
|
||||
#else
|
||||
#if IOS
|
||||
[Obsolete ("Do not use; this API was removed and will always return 0.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
|
||||
#endif
|
||||
#endif
|
||||
public virtual ulong ActivityStart ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !NET
|
||||
[Deprecated (PlatformName.iOS, 9,0, message: "Empty stub (rejected by Apple). Use 'QualityOfService' property.")]
|
||||
[Deprecated (PlatformName.MacOSX, 10,11, message: "Empty stub (rejected by Apple). Use 'QualityOfService' property.")]
|
||||
#else
|
||||
[UnsupportedOSPlatform ("ios9.0")]
|
||||
[UnsupportedOSPlatform ("macos10.11")]
|
||||
#if IOS
|
||||
[Obsolete ("Empty stub (rejected by Apple). Use 'QualityOfService' property.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
|
||||
#elif MONOMAC
|
||||
[Obsolete ("Empty stub (rejected by Apple). Use 'QualityOfService' property.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
|
||||
#endif
|
||||
#endif
|
||||
public virtual bool UsesBackgroundSession { get; set; }
|
||||
}
|
||||
|
||||
|
@ -107,13 +91,7 @@ namespace CloudKit {
|
|||
public delegate void CKDiscoverUserInfosCompletionHandler (NSDictionary emailsToUserInfos, NSDictionary userRecordIdsToUserInfos, NSError operationError);
|
||||
|
||||
#if !WATCH
|
||||
#if !NET
|
||||
[Obsoleted (PlatformName.iOS, 14, 0, message : "Use 'CKDiscoverUserIdentitiesOperation' instead.")]
|
||||
#else
|
||||
#if IOS
|
||||
[Obsolete ("Use 'CKDiscoverUserIdentitiesOperation' instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
|
||||
#endif
|
||||
#endif
|
||||
public partial class CKDiscoverUserInfosOperation : CKOperation {
|
||||
|
||||
public CKDiscoverUserInfosOperation () : base () { }
|
||||
|
@ -126,9 +104,7 @@ namespace CloudKit {
|
|||
protected CKDiscoverUserInfosOperation (NativeHandle handle)
|
||||
=> throw new NotSupportedException ();
|
||||
|
||||
#if !NET
|
||||
[iOS (8,0), Mac (10,10)]
|
||||
#endif
|
||||
[Obsolete ("Empty stub (not a public API).")]
|
||||
public virtual CKDiscoverUserInfosCompletionHandler Completed { get; set; }
|
||||
|
||||
|
@ -165,36 +141,22 @@ namespace CloudKit {
|
|||
|
||||
#if MONOMAC || IOS
|
||||
public partial class CKDiscoveredUserInfo {
|
||||
#if !NET
|
||||
[iOS (9,0)][Mac (10,11)]
|
||||
[Obsolete ("Empty stub (not public API).")]
|
||||
#else
|
||||
[Obsolete ("Empty stub (not public API).", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")]
|
||||
#endif
|
||||
public virtual CNContact DisplayContact { get; }
|
||||
|
||||
#if NET
|
||||
[UnsupportedOSPlatform ("ios15.0")]
|
||||
[UnsupportedOSPlatform ("macos12.0")]
|
||||
#else
|
||||
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'DisplayContact.GivenName'.")]
|
||||
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'DisplayContact.GivenName'.")]
|
||||
[Obsoleted (PlatformName.MacOSX, 12, 0, message : "Use 'DisplayContact.GivenName'.")]
|
||||
[Obsoleted (PlatformName.iOS, 15, 0, message : "Use 'DisplayContact.GivenName'.")]
|
||||
#endif
|
||||
public virtual string FirstName {
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#if NET
|
||||
[UnsupportedOSPlatform ("ios15.0")]
|
||||
[UnsupportedOSPlatform ("macos12.0")]
|
||||
#else
|
||||
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'DisplayContact.FamilyName'.")]
|
||||
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'DisplayContact.FamilyName'.")]
|
||||
[Obsoleted (PlatformName.MacOSX, 12, 0, message : "Use 'DisplayContact.FamilyName'.")]
|
||||
[Obsoleted (PlatformName.iOS, 15, 0, message : "Use 'DisplayContact.FamilyName'.")]
|
||||
#endif
|
||||
public virtual string LastName {
|
||||
get { return null; }
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ namespace CloudKit {
|
|||
[iOS (8,0), Mac (10,10)]
|
||||
[BaseType (typeof (CKOperation))]
|
||||
[DisableDefaultCtor]
|
||||
#if XAMCORE_4_0 || WATCH
|
||||
#if NET || WATCH
|
||||
[Abstract] // as per docs
|
||||
#endif
|
||||
interface CKDatabaseOperation {
|
||||
|
@ -827,7 +827,7 @@ namespace CloudKit {
|
|||
}
|
||||
|
||||
[iOS (8,0), Watch (3,0), TV (10,0), Mac (10,10)]
|
||||
#if XAMCORE_4_0 || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
|
||||
#if NET || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
|
||||
[DisableDefaultCtor]
|
||||
#endif
|
||||
[BaseType (typeof (NSSortDescriptor))]
|
||||
|
@ -1079,7 +1079,7 @@ namespace CloudKit {
|
|||
[iOS (8,0), Mac (10,10)]
|
||||
[DisableDefaultCtor] // NSInvalidArgumentException Reason: CKNotification is not meant for direct instantiation
|
||||
[BaseType (typeof (NSObject))]
|
||||
#if XAMCORE_4_0 || WATCH
|
||||
#if NET || WATCH
|
||||
[Abstract] // as per doc
|
||||
#endif
|
||||
interface CKNotification : NSSecureCoding {
|
||||
|
@ -1178,7 +1178,7 @@ namespace CloudKit {
|
|||
CKQueryNotificationReason QueryNotificationReason { get; }
|
||||
|
||||
[NullAllowed, Export ("recordFields", ArgumentSemantic.Copy)]
|
||||
#if XAMCORE_4_0
|
||||
#if XAMCORE_5_0 // delayed until next time due to #13704.
|
||||
NSDictionary<NSString, NSObject> RecordFields { get; }
|
||||
#else
|
||||
NSDictionary RecordFields { get; }
|
||||
|
@ -1242,7 +1242,7 @@ namespace CloudKit {
|
|||
[iOS (8,0), Mac (10,10)]
|
||||
[BaseType (typeof (NSOperation))]
|
||||
[DisableDefaultCtor]
|
||||
#if XAMCORE_4_0 || WATCH
|
||||
#if NET || WATCH
|
||||
[Abstract] // as per docs
|
||||
#endif
|
||||
interface CKOperation {
|
||||
|
@ -1557,7 +1557,7 @@ namespace CloudKit {
|
|||
|
||||
[iOS (8,0), Mac (10,10)]
|
||||
[Watch (3,0)]
|
||||
#if XAMCORE_4_0 || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
|
||||
#if NET || WATCH // does not work on watchOS, existiong init* does not allow null to be used to fake it
|
||||
[DisableDefaultCtor]
|
||||
#endif
|
||||
[BaseType (typeof (NSObject))]
|
||||
|
|
Загрузка…
Ссылка в новой задаче