示例#1
0
 public WDCardPayment(NSDecimalNumber amount, WDCurrency amountCurrency, WDTransactionType transactionType)
     : base(NSObjectFlag.Empty)
 {
     if (amount == null)
     {
         throw new ArgumentNullException("amount");
     }
     IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
     if (IsDirectBinding)
     {
         if (IntPtr.Size == 8)
         {
             InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_Int64_Int64(this.Handle, Selector.GetHandle("initWithAmount:amountCurrency:transactionType:"), amount.Handle, (Int64)amountCurrency, (Int64)transactionType), "initWithAmount:amountCurrency:transactionType:");
         }
         else
         {
             InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_int_int(this.Handle, Selector.GetHandle("initWithAmount:amountCurrency:transactionType:"), amount.Handle, (int)amountCurrency, (int)transactionType), "initWithAmount:amountCurrency:transactionType:");
         }
     }
     else
     {
         if (IntPtr.Size == 8)
         {
             InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_Int64_Int64(this.SuperHandle, Selector.GetHandle("initWithAmount:amountCurrency:transactionType:"), amount.Handle, (Int64)amountCurrency, (Int64)transactionType), "initWithAmount:amountCurrency:transactionType:");
         }
         else
         {
             InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_int_int(this.SuperHandle, Selector.GetHandle("initWithAmount:amountCurrency:transactionType:"), amount.Handle, (int)amountCurrency, (int)transactionType), "initWithAmount:amountCurrency:transactionType:");
         }
     }
 }
示例#2
0
        public WDCardPayment(NSDecimalNumber amount, string currency, WDTransactionType transactionType)
            : base(NSObjectFlag.Empty)
        {
            if (amount == null)
            {
                throw new ArgumentNullException("amount");
            }
            if (currency == null)
            {
                throw new ArgumentNullException("currency");
            }
            var nscurrency = NSString.CreateNative(currency);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_Int64(this.Handle, Selector.GetHandle("initWithAmount:currencyString:transactionType:"), amount.Handle, nscurrency, (Int64)transactionType), "initWithAmount:currencyString:transactionType:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_int(this.Handle, Selector.GetHandle("initWithAmount:currencyString:transactionType:"), amount.Handle, nscurrency, (int)transactionType), "initWithAmount:currencyString:transactionType:");
                }
            }
            else
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_Int64(this.SuperHandle, Selector.GetHandle("initWithAmount:currencyString:transactionType:"), amount.Handle, nscurrency, (Int64)transactionType), "initWithAmount:currencyString:transactionType:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_int(this.SuperHandle, Selector.GetHandle("initWithAmount:currencyString:transactionType:"), amount.Handle, nscurrency, (int)transactionType), "initWithAmount:currencyString:transactionType:");
                }
            }
            NSString.ReleaseNative(nscurrency);
        }
        public WDApplePayPayment(global::PassKit.PKPayment payment, global::PassKit.PKPaymentSummaryItem[] summaryItems, WDCurrency currency, WDTransactionType transactionType)
            : base(NSObjectFlag.Empty)
        {
            if (payment == null)
            {
                throw new ArgumentNullException("payment");
            }
            if (summaryItems == null)
            {
                throw new ArgumentNullException("summaryItems");
            }
            var nsa_summaryItems = NSArray.FromNSObjects(summaryItems);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_Int64_Int64(this.Handle, Selector.GetHandle("initWithPayment:summaryItems:currency:transactionType:"), payment.Handle, nsa_summaryItems.Handle, (Int64)currency, (Int64)transactionType), "initWithPayment:summaryItems:currency:transactionType:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_int_int(this.Handle, Selector.GetHandle("initWithPayment:summaryItems:currency:transactionType:"), payment.Handle, nsa_summaryItems.Handle, (int)currency, (int)transactionType), "initWithPayment:summaryItems:currency:transactionType:");
                }
            }
            else
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_Int64_Int64(this.SuperHandle, Selector.GetHandle("initWithPayment:summaryItems:currency:transactionType:"), payment.Handle, nsa_summaryItems.Handle, (Int64)currency, (Int64)transactionType), "initWithPayment:summaryItems:currency:transactionType:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_int_int(this.SuperHandle, Selector.GetHandle("initWithPayment:summaryItems:currency:transactionType:"), payment.Handle, nsa_summaryItems.Handle, (int)currency, (int)transactionType), "initWithPayment:summaryItems:currency:transactionType:");
                }
            }
            nsa_summaryItems.Dispose();
        }
示例#4
0
 static extern NSString WDTransactionTypeGetCode(WDTransactionType transactionType);