public WDApplePayManagedPayment(string appleMerchantID, WDCountry merchantCountry)
            : base(NSObjectFlag.Empty)
        {
            if (appleMerchantID == null)
            {
                throw new ArgumentNullException("appleMerchantID");
            }
            var nsappleMerchantID = NSString.CreateNative(appleMerchantID);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_Int64(this.Handle, Selector.GetHandle("initWithMerchant:andCountry:"), nsappleMerchantID, (Int64)merchantCountry), "initWithMerchant:andCountry:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_int(this.Handle, Selector.GetHandle("initWithMerchant:andCountry:"), nsappleMerchantID, (int)merchantCountry), "initWithMerchant:andCountry:");
                }
            }
            else
            {
                if (IntPtr.Size == 8)
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_Int64(this.SuperHandle, Selector.GetHandle("initWithMerchant:andCountry:"), nsappleMerchantID, (Int64)merchantCountry), "initWithMerchant:andCountry:");
                }
                else
                {
                    InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_int(this.SuperHandle, Selector.GetHandle("initWithMerchant:andCountry:"), nsappleMerchantID, (int)merchantCountry), "initWithMerchant:andCountry:");
                }
            }
            NSString.ReleaseNative(nsappleMerchantID);
        }
예제 #2
0
 static extern NSString WDCountryGetISOCode(WDCountry country);