public virtual void SetProfileFieldWithKey(string key, NSObject value)
        {
            if (key == null)
            {
                ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(key));
            }
            var value__handle__ = value.GetNonNullHandle(nameof(value));
            var nskey           = NSString.CreateNative(key);

            if (IsDirectBinding)
            {
                global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle("setProfileFieldWithKey:andValue:"), nskey, value__handle__);
            }
            else
            {
                global::ApiDefinition.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("setProfileFieldWithKey:andValue:"), nskey, value__handle__);
            }
            NSString.ReleaseNative(nskey);
        }
 public void RemoveObserver(CFNotificationObserverToken token)
 {
     if (token == null)
     {
         throw new ArgumentNullException("token");
     }
     if (token.nameHandle == IntPtr.Zero)
     {
         throw new ObjectDisposedException("token");
     }
     if (token.centerHandle != handle)
     {
         throw new ArgumentException("token", "This token belongs to a different notification center");
     }
     lock (listeners){
         var list = listeners [token.stringName];
         List <CFNotificationObserverToken> newList = null;
         foreach (var e in list)
         {
             if (e == token)
             {
                 continue;
             }
             if (newList == null)
             {
                 newList = new List <CFNotificationObserverToken> ();
             }
             newList.Add(e);
         }
         if (newList != null)
         {
             listeners [token.stringName] = newList;
             return;
         }
         else
         {
             listeners.Remove(token.stringName);
         }
     }
     CFNotificationCenterRemoveObserver(handle, this.Handle, name: token.nameHandle, obj: token.observedObject);
     NSString.ReleaseNative(token.nameHandle);
     token.nameHandle = IntPtr.Zero;
 }
        public static NSDictionary <NSString, NSNumber> GetDictionaryOfBoolVariableWithName(this CleverTap This, string name, NSDictionary <NSString, NSNumber> defaultValue)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (defaultValue == null)
            {
                throw new ArgumentNullException("defaultValue");
            }
            var nsname = NSString.CreateNative(name);

            NSDictionary <NSString, NSNumber> ret;

            ret = Runtime.GetNSObject <NSDictionary <NSString, NSNumber> > (global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(This.Handle, Selector.GetHandle("getDictionaryOfBoolVariableWithName:defaultValue:"), nsname, defaultValue.Handle));
            NSString.ReleaseNative(nsname);

            return(ret);
        }
示例#4
0
        public static bool ArchiveObject(NSObject @object, string fileName)
        {
            if (@object == null)
            {
                throw new ArgumentNullException("@object");
            }
            if (fileName == null)
            {
                throw new ArgumentNullException("fileName");
            }
            var nsfileName = NSString.CreateNative(fileName);

            bool ret;

            ret = global::ApiDefinition.Messaging.bool_objc_msgSend_IntPtr_IntPtr(class_ptr, Selector.GetHandle("archiveObject:forFileName:"), @object.Handle, nsfileName);
            NSString.ReleaseNative(nsfileName);

            return(ret);
        }
示例#5
0
        public static CGImageDestination Create(NSUrl url, string typeIdentifier, int imageCount)
        {
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            if (typeIdentifier == null)
            {
                throw new ArgumentNullException("typeIdentifier");
            }

            var    typeId = NSString.CreateNative(typeIdentifier);
            IntPtr p      = CGImageDestinationCreateWithURL(url.Handle, typeId, imageCount, IntPtr.Zero);

            NSString.ReleaseNative(typeId);
            var ret = p == IntPtr.Zero ? null : new CGImageDestination(p, true);

            return(ret);
        }
示例#6
0
        public string [] CopyAllTags(string uti, string tagClass)
        {
            if (uti == null)
            {
                throw new ArgumentNullException("uti");
            }
            if (tagClass == null)
            {
                throw new ArgumentNullException("tagClass");
            }

            var a   = NSString.CreateNative(uti);
            var b   = NSString.CreateNative(tagClass);
            var ret = NSArray.StringArrayFromHandle(UTTypeCopyAllTagsWithClass(a, b));

            NSString.ReleaseNative(a);
            NSString.ReleaseNative(b);
            return(ret);
        }
示例#7
0
        public SbtResult SbtExecuteCommand(int opCode, string inXML, ref NSMutableString outXML, int scannerID)
        {
            if (inXML == null)
            {
                throw new ArgumentNullException("inXML");
            }
            IntPtr outXMLValue = outXML.Handle;

            var nsinXML = NSString.CreateNative(inXML);

            SbtResult ret;

            ret = (SbtResult)global::ApiDefinition.ZebraMessaging.UInt32_objc_msgSend_int_IntPtr_ref_IntPtr_int(this.Handle, Selector.GetHandle("sbtExecuteCommand:aInXML:aOutXML:forScanner:"), opCode, nsinXML, ref outXMLValue, scannerID);
            NSString.ReleaseNative(nsinXML);

            outXML = Runtime.GetNSObject <NSMutableString> (outXMLValue);

            return(ret);
        }
示例#8
0
        public static string GetPreferredTag(string uti, string tagClass)
        {
            if (uti == null)
            {
                throw new ArgumentNullException("uti");
            }
            if (tagClass == null)
            {
                throw new ArgumentNullException("tagClass");
            }

            var a   = NSString.CreateNative(uti);
            var b   = NSString.CreateNative(tagClass);
            var ret = NSString.FromHandle(UTTypeCopyPreferredTagWithClass(a, b));

            NSString.ReleaseNative(a);
            NSString.ReleaseNative(b);
            return(ret);
        }
示例#9
0
        public bool ConformsTo(string uti, string conformsToUti)
        {
            if (uti == null)
            {
                throw new ArgumentNullException("uti");
            }
            if (conformsToUti == null)
            {
                throw new ArgumentNullException("conformsToUti");
            }

            var a   = NSString.CreateNative(uti);
            var b   = NSString.CreateNative(conformsToUti);
            var ret = UTTypeConformsTo(a, b);

            NSString.ReleaseNative(a);
            NSString.ReleaseNative(b);
            return(ret != 0);
        }
示例#10
0
        public static void DidFindADataBlockWithNdef(this IFmSessionManagerDelegate This, NSDictionary ndef, string device, NSError error)
        {
            if (ndef == null)
            {
                throw new ArgumentNullException("ndef");
            }
            if (device == null)
            {
                throw new ArgumentNullException("device");
            }
            if (error == null)
            {
                throw new ArgumentNullException("error");
            }
            var nsdevice = NSString.CreateNative(device);

            global::ApiDefinitions.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(This.Handle, Selector.GetHandle("didFindADataBlockWithNdef:fromDevice:withError:"), ndef.Handle, nsdevice, error.Handle);
            NSString.ReleaseNative(nsdevice);
        }
        public static void SetAttachment(this ICMAttachmentBearer target, string key, INativeObject value, CMAttachmentMode attachmentMode)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }
            var nsKey = NSString.CreateNative(key);

            CMSetAttachment(target.Handle, nsKey, value.Handle, attachmentMode);
            NSString.ReleaseNative(nsKey);
        }
示例#12
0
        public static void Hnk_setImage(this global::MonoTouch.UIKit.UIImageView This, global::MonoTouch.UIKit.UIImage image, string key, global::MonoTouch.UIKit.UIImage placeholder)
        {
            if (image == null)
            {
                throw new ArgumentNullException("image");
            }
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            if (placeholder == null)
            {
                throw new ArgumentNullException("placeholder");
            }
            var nskey = NSString.CreateNative(key);

            ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr(This.Handle, selHnk_setImageWithKeyPlaceholder_Handle, image.Handle, nskey, placeholder.Handle);
            NSString.ReleaseNative(nskey);
        }
示例#13
0
        public static NSObject InitWithLaunchOptions(NSDictionary launchOptions, string appId)
        {
            if (launchOptions == null)
            {
                throw new ArgumentNullException("launchOptions");
            }
            if (appId == null)
            {
                throw new ArgumentNullException("appId");
            }
            var nsappId = NSString.CreateNative(appId);

            NSObject ret;

            ret = Runtime.GetNSObject(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(class_ptr, Selector.GetHandle("initWithLaunchOptions:appId:"), launchOptions.Handle, nsappId));
            NSString.ReleaseNative(nsappId);

            return(ret);
        }
示例#14
0
        public virtual void InitWithTenderType(string tt, string xt, string invno, string ck, string regId, string amt, string tipamt, string cashbkamt, string refno, string usr, string password, string merchant, string merchacct, string devtype, string test)
        {
            var nstt        = NSString.CreateNative(tt);
            var nsxt        = NSString.CreateNative(xt);
            var nsinvno     = NSString.CreateNative(invno);
            var nsck        = NSString.CreateNative(ck);
            var nsregId     = NSString.CreateNative(regId);
            var nsamt       = NSString.CreateNative(amt);
            var nstipamt    = NSString.CreateNative(tipamt);
            var nscashbkamt = NSString.CreateNative(cashbkamt);
            var nsrefno     = NSString.CreateNative(refno);
            var nsusr       = NSString.CreateNative(usr);
            var nspassword  = NSString.CreateNative(password);
            var nsmerchant  = NSString.CreateNative(merchant);
            var nsmerchacct = NSString.CreateNative(merchacct);
            var nsdevtype   = NSString.CreateNative(devtype);
            var nstest      = NSString.CreateNative(test);

            if (IsDirectBinding)
            {
                global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(this.Handle, Selector.GetHandle("initWithTenderType:transactionType:invoiceNumber:clerkId:regiserId:amount:tipAmount:cashBackAmount:originalReferenceNumber:username:password:merchantCode:merchantAccountCode:deviceType:testMode:"), nstt, nsxt, nsinvno, nsck, nsregId, nsamt, nstipamt, nscashbkamt, nsrefno, nsusr, nspassword, nsmerchant, nsmerchacct, nsdevtype, nstest);
            }
            else
            {
                global::ApiDefinition.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("initWithTenderType:transactionType:invoiceNumber:clerkId:regiserId:amount:tipAmount:cashBackAmount:originalReferenceNumber:username:password:merchantCode:merchantAccountCode:deviceType:testMode:"), nstt, nsxt, nsinvno, nsck, nsregId, nsamt, nstipamt, nscashbkamt, nsrefno, nsusr, nspassword, nsmerchant, nsmerchacct, nsdevtype, nstest);
            }
            NSString.ReleaseNative(nstt);
            NSString.ReleaseNative(nsxt);
            NSString.ReleaseNative(nsinvno);
            NSString.ReleaseNative(nsck);
            NSString.ReleaseNative(nsregId);
            NSString.ReleaseNative(nsamt);
            NSString.ReleaseNative(nstipamt);
            NSString.ReleaseNative(nscashbkamt);
            NSString.ReleaseNative(nsrefno);
            NSString.ReleaseNative(nsusr);
            NSString.ReleaseNative(nspassword);
            NSString.ReleaseNative(nsmerchant);
            NSString.ReleaseNative(nsmerchacct);
            NSString.ReleaseNative(nsdevtype);
            NSString.ReleaseNative(nstest);
        }
        public AFTrackPointsBuilder(string appName, string sectionName, AFProduct[] products, AFOrder order, NSNumber[] trackpointIds)
            : base(NSObjectFlag.Empty)
        {
            if (appName == null)
            {
                throw new ArgumentNullException("appName");
            }
            if (sectionName == null)
            {
                throw new ArgumentNullException("sectionName");
            }
            if (products == null)
            {
                throw new ArgumentNullException("products");
            }
            if (order == null)
            {
                throw new ArgumentNullException("order");
            }
            if (trackpointIds == null)
            {
                throw new ArgumentNullException("trackpointIds");
            }
            var nsappName         = NSString.CreateNative(appName);
            var nssectionName     = NSString.CreateNative(sectionName);
            var nsa_products      = NSArray.FromNSObjects(products);
            var nsa_trackpointIds = NSArray.FromNSObjects(trackpointIds);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(this.Handle, Selector.GetHandle("initWithAppName:sectionName:products:order:trackPointIds:"), nsappName, nssectionName, nsa_products.Handle, order.Handle, nsa_trackpointIds.Handle), "initWithAppName:sectionName:products:order:trackPointIds:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("initWithAppName:sectionName:products:order:trackPointIds:"), nsappName, nssectionName, nsa_products.Handle, order.Handle, nsa_trackpointIds.Handle), "initWithAppName:sectionName:products:order:trackPointIds:");
            }
            NSString.ReleaseNative(nsappName);
            NSString.ReleaseNative(nssectionName);
            nsa_products.Dispose();
            nsa_trackpointIds.Dispose();
        }
        public static T GetAttachment <T> (this ICMAttachmentBearer target, string key, out CMAttachmentMode attachmentModeOut) where T : class, INativeObject
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            if (key == null)
            {
                throw new ArgumentNullException(nameof(key));
            }
            var nsKey  = NSString.CreateNative(key);
            var attchm = CMGetAttachment(target.Handle, nsKey, out attachmentModeOut);

            NSString.ReleaseNative(nsKey);
            if (attchm != IntPtr.Zero)
            {
                return(Runtime.GetINativeObject <T> (attchm, false));
            }
            return(default(T));
        }
        public static string[] GetArrayOfStringVariableWithName(this CleverTap This, string name, string[] defaultValue)
        {
            if (name == null)
            {
                ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(name));
            }
            if (defaultValue == null)
            {
                ObjCRuntime.ThrowHelper.ThrowArgumentNullException(nameof(defaultValue));
            }
            var nsname           = NSString.CreateNative(name);
            var nsa_defaultValue = NSArray.FromStrings(defaultValue);

            string[] ret;
            ret = NSArray.StringArrayFromHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(This.Handle, Selector.GetHandle("getArrayOfStringVariableWithName:defaultValue:"), nsname, nsa_defaultValue.Handle));
            NSString.ReleaseNative(nsname);
            nsa_defaultValue.Dispose();

            return(ret !);
        }
        public static global::UIKit.UIImage ImageForName(string name, string type)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            var nsname = NSString.CreateNative(name);
            var nstype = NSString.CreateNative(type);

            global::UIKit.UIImage ret;
            ret = Runtime.GetNSObject <global::UIKit.UIImage> (global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(class_ptr, Selector.GetHandle("imageForName:type:"), nsname, nstype));
            NSString.ReleaseNative(nsname);
            NSString.ReleaseNative(nstype);

            return(ret);
        }
示例#19
0
        public BrandQuery(string brandID, LPCampaignInfo campaignInfo)
            : base(NSObjectFlag.Empty)
        {
            if (brandID == null)
            {
                throw new ArgumentNullException("brandID");
            }
            var nsbrandID = NSString.CreateNative(brandID);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle("initWithBrandID:campaignInfo:"), nsbrandID, campaignInfo == null ? IntPtr.Zero : campaignInfo.Handle), "initWithBrandID:campaignInfo:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("initWithBrandID:campaignInfo:"), nsbrandID, campaignInfo == null ? IntPtr.Zero : campaignInfo.Handle), "initWithBrandID:campaignInfo:");
            }
            NSString.ReleaseNative(nsbrandID);
        }
        public AsSelectMaskParam(int index, MaskTargetType maskTarget, MaskActionType maskAction, MemoryBank maskBank, int maskOffset, string maskData, int maskLength, bool usedMask)
            : base(NSObjectFlag.Empty)
        {
            if (maskData == null)
            {
                throw new ArgumentNullException("maskData");
            }
            var nsmaskData = NSString.CreateNative(maskData);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_int_UInt32_UInt32_UInt32_int_IntPtr_int_bool(this.Handle, Selector.GetHandle("initWithParameterLength:target:action:bank:offset:mask:length:used:"), index, (UInt32)maskTarget, (UInt32)maskAction, (UInt32)maskBank, maskOffset, nsmaskData, maskLength, usedMask), "initWithParameterLength:target:action:bank:offset:mask:length:used:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_int_UInt32_UInt32_UInt32_int_IntPtr_int_bool(this.SuperHandle, Selector.GetHandle("initWithParameterLength:target:action:bank:offset:mask:length:used:"), index, (UInt32)maskTarget, (UInt32)maskAction, (UInt32)maskBank, maskOffset, nsmaskData, maskLength, usedMask), "initWithParameterLength:target:action:bank:offset:mask:length:used:");
            }
            NSString.ReleaseNative(nsmaskData);
        }
示例#21
0
        public GPUImageFilter(string fragmentShaderString)
            : base(NSObjectFlag.Empty)
        {
            if (fragmentShaderString == null)
            {
                throw new ArgumentNullException("fragmentShaderString");
            }
            var nsfragmentShaderString = NSString.CreateNative(fragmentShaderString);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("initWithFragmentShaderFromString:"), nsfragmentShaderString), "initWithFragmentShaderFromString:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("initWithFragmentShaderFromString:"), nsfragmentShaderString), "initWithFragmentShaderFromString:");
            }
            NSString.ReleaseNative(nsfragmentShaderString);
        }
示例#22
0
            public static string GetBundleName()
            {
                IntPtr mainBundle = GetMainBundle();

                if (mainBundle == IntPtr.Zero)
                {
                    return(null);
                }
                IntPtr infoDictionary = GetInfoDictionary(mainBundle);

                if (infoDictionary == IntPtr.Zero)
                {
                    return(null);
                }
                IntPtr intPtr    = NSString.CreateNative("CFBundleName", false);
                IntPtr usrhandle = NSDictionary.ObjectForKey(infoDictionary, intPtr);

                NSString.ReleaseNative(intPtr);
                return(NSString.FromHandle(usrhandle));
            }
示例#23
0
        public virtual void StartWithApiKey(string apiKey, string urlString)
        {
            if (apiKey == null)
            {
                throw new ArgumentNullException("apiKey");
            }
            var nsapiKey    = NSString.CreateNative(apiKey);
            var nsurlString = NSString.CreateNative(urlString);

            if (IsDirectBinding)
            {
                global::ApiDefinitions.Messaging.void_objc_msgSend_IntPtr_IntPtr(this.Handle, Selector.GetHandle("startWithApiKey:urlString:"), nsapiKey, nsurlString);
            }
            else
            {
                global::ApiDefinitions.Messaging.void_objc_msgSendSuper_IntPtr_IntPtr(this.SuperHandle, Selector.GetHandle("startWithApiKey:urlString:"), nsapiKey, nsurlString);
            }
            NSString.ReleaseNative(nsapiKey);
            NSString.ReleaseNative(nsurlString);
        }
示例#24
0
        public AsRingAccessoryBaseSDK(string deviceModel)
            : base(NSObjectFlag.Empty)
        {
            if (deviceModel == null)
            {
                throw new ArgumentNullException("deviceModel");
            }
            var nsdeviceModel = NSString.CreateNative(deviceModel);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("initWithDeviceModel:"), nsdeviceModel), "initWithDeviceModel:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("initWithDeviceModel:"), nsdeviceModel), "initWithDeviceModel:");
            }
            NSString.ReleaseNative(nsdeviceModel);
        }
        public static NSNumber[] GetArrayOfIntegerVariableWithName(this CleverTap This, string name, NSNumber[] defaultValue)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (defaultValue == null)
            {
                throw new ArgumentNullException("defaultValue");
            }
            var nsname           = NSString.CreateNative(name);
            var nsa_defaultValue = NSArray.FromNSObjects(defaultValue);

            NSNumber[] ret;
            ret = NSArray.ArrayFromHandle <NSNumber>(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr(This.Handle, Selector.GetHandle("getArrayOfIntegerVariableWithName:defaultValue:"), nsname, nsa_defaultValue.Handle));
            NSString.ReleaseNative(nsname);
            nsa_defaultValue.Dispose();

            return(ret);
        }
        public MCSwipeTableViewCell(global::MonoTouch.UIKit.UITableViewCellStyle cellStyle, string reuseIdentifier)
            : base(NSObjectFlag.Empty)
        {
            if (reuseIdentifier == null)
            {
                throw new ArgumentNullException("reuseIdentifier");
            }
            var nsreuseIdentifier = NSString.CreateNative(reuseIdentifier);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(ApiDefinition.Messaging.IntPtr_objc_msgSend_int_IntPtr(this.Handle, selInitWithStyleReuseIdentifier_Handle, (int)cellStyle, nsreuseIdentifier), "initWithStyle:reuseIdentifier:");
            }
            else
            {
                InitializeHandle(ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_int_IntPtr(this.SuperHandle, selInitWithStyleReuseIdentifier_Handle, (int)cellStyle, nsreuseIdentifier), "initWithStyle:reuseIdentifier:");
            }
            NSString.ReleaseNative(nsreuseIdentifier);
        }
示例#27
0
        public ACRTrack2Data(string track2String)
            : base(NSObjectFlag.Empty)
        {
            if (track2String == null)
            {
                throw new ArgumentNullException("track2String");
            }
            var nstrack2String = NSString.CreateNative(track2String);

            IsDirectBinding = GetType().Assembly == global::ApiDefinitions.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinitions.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("initWithString:"), nstrack2String), "initWithString:");
            }
            else
            {
                InitializeHandle(global::ApiDefinitions.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("initWithString:"), nstrack2String), "initWithString:");
            }
            NSString.ReleaseNative(nstrack2String);
        }
示例#28
0
        public ClarifaiConcept(NSString conceptId)
            : base(NSObjectFlag.Empty)
        {
            if (conceptId == null)
            {
                throw new ArgumentNullException(nameof(conceptId));
            }
            var nsconceptId = NSString.CreateNative(conceptId);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("initWithConceptId:"), nsconceptId), "initWithConceptId:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("initWithConceptId:"), nsconceptId), "initWithConceptId:");
            }
            NSString.ReleaseNative(nsconceptId);
        }
        public FLIRCameraEvent(string ipAddress)
            : base(NSObjectFlag.Empty)
        {
            if (ipAddress == null)
            {
                throw new ArgumentNullException("ipAddress");
            }
            var nsipAddress = NSString.CreateNative(ipAddress);

            IsDirectBinding = GetType().Assembly == global::ApiDefinition.Messaging.this_assembly;
            if (IsDirectBinding)
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("initWithCameraIpAddress:"), nsipAddress), "initWithCameraIpAddress:");
            }
            else
            {
                InitializeHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("initWithCameraIpAddress:"), nsipAddress), "initWithCameraIpAddress:");
            }
            NSString.ReleaseNative(nsipAddress);
        }
示例#30
0
        public unsafe static void Hnk_setImage(this global::MonoTouch.UIKit.UIImageView This, global::MonoTouch.UIKit.UIImage image, string key, global::MonoTouch.UIKit.UIImage placeholder, [BlockProxy(typeof(MonoTouch.ObjCRuntime.Trampolines.NIDCallbackblock))] Callbackblock successBlock, [BlockProxy(typeof(MonoTouch.ObjCRuntime.Trampolines.NIDCallbackblock))] Callbackblock failureBlock)
        {
            if (image == null)
            {
                throw new ArgumentNullException("image");
            }
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            if (placeholder == null)
            {
                throw new ArgumentNullException("placeholder");
            }
            if (successBlock == null)
            {
                throw new ArgumentNullException("successBlock");
            }
            if (failureBlock == null)
            {
                throw new ArgumentNullException("failureBlock");
            }
            var           nskey = NSString.CreateNative(key);
            BlockLiteral *block_ptr_successBlock;
            BlockLiteral  block_successBlock;

            block_successBlock     = new BlockLiteral();
            block_ptr_successBlock = &block_successBlock;
            block_successBlock.SetupBlock(Trampolines.SDCallbackblock.Handler, successBlock);
            BlockLiteral *block_ptr_failureBlock;
            BlockLiteral  block_failureBlock;

            block_failureBlock     = new BlockLiteral();
            block_ptr_failureBlock = &block_failureBlock;
            block_failureBlock.SetupBlock(Trampolines.SDCallbackblock.Handler, failureBlock);

            ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(This.Handle, selHnk_setImageWithKeyPlaceholderSuccessFailure_Handle, image.Handle, nskey, placeholder.Handle, (IntPtr)block_ptr_successBlock, (IntPtr)block_ptr_failureBlock);
            NSString.ReleaseNative(nskey);
            block_ptr_successBlock->CleanupBlock();
            block_ptr_failureBlock->CleanupBlock();
        }