コード例 #1
0
ファイル: CKRecord.cs プロジェクト: ygbr-pub/HHCloudKitAsUPM
        /// <summary>
        /// </summary>
        /// <param name="parentRecordID"></param>
        /// <returns>void</returns>
        public void SetParentReferenceFromRecordID(
            CKRecordID parentRecordID)
        {
            CKRecord_setParentReferenceFromRecordID(
                Handle,
                parentRecordID != null ? HandleRef.ToIntPtr(parentRecordID.Handle) : IntPtr.Zero,
                out IntPtr exceptionPtr);

            if (exceptionPtr != IntPtr.Zero)
            {
                var nativeException = new NSException(exceptionPtr);
                throw new CloudKitException(nativeException, nativeException.Reason);
            }
        }
コード例 #2
0
        public CKShare(
            CKRecord rootRecord,
            CKRecordID shareID
            )
        {
            IntPtr ptr = CKShare_initWithRootRecord_shareID(
                rootRecord != null ? HandleRef.ToIntPtr(rootRecord.Handle) : IntPtr.Zero,
                shareID != null ? HandleRef.ToIntPtr(shareID.Handle) : IntPtr.Zero,
                out IntPtr exceptionPtr);

            if (exceptionPtr != IntPtr.Zero)
            {
                var nativeException = new NSException(exceptionPtr);
                throw new CloudKitException(nativeException, nativeException.Reason);
            }

            Handle = new HandleRef(this, ptr);
        }
        public CKUserIdentityLookupInfo(
            CKRecordID userRecordID
            )
        {
            if (userRecordID == null)
            {
                throw new ArgumentNullException(nameof(userRecordID));
            }

            IntPtr ptr = CKUserIdentityLookupInfo_initWithUserRecordID(
                userRecordID != null ? HandleRef.ToIntPtr(userRecordID.Handle) : IntPtr.Zero,
                out IntPtr exceptionPtr);

            if (exceptionPtr != IntPtr.Zero)
            {
                var nativeException = new NSException(exceptionPtr);
                throw new CloudKitException(nativeException, nativeException.Reason);
            }

            Handle = new HandleRef(this, ptr);
        }
コード例 #4
0
        public CKReference(
            CKRecordID recordID,
            CKReferenceAction action
            )
        {
            if (recordID == null)
            {
                throw new ArgumentNullException(nameof(recordID));
            }

            IntPtr ptr = CKReference_initWithRecordID_action(
                recordID != null ? HandleRef.ToIntPtr(recordID.Handle) : IntPtr.Zero,
                (long)action,
                out IntPtr exceptionPtr);

            if (exceptionPtr != IntPtr.Zero)
            {
                var nativeException = new NSException(exceptionPtr);
                throw new CloudKitException(nativeException, nativeException.Reason);
            }

            Handle = new HandleRef(this, ptr);
        }