Esempio n. 1
0
 public static NSDictionary FromFile(string path)
 {
     return(Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithContentsOfFile:"), path)));
 }
Esempio n. 2
0
 public string[] KeysForObject(NSObject obj)
 {
     return(ObjC.FromNSArray(Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("allKeysForObject:"), obj.Handle)).Handle));
 }
Esempio n. 3
0
        public NSObject[] ObjectsForKeys(string[] keys)
        {
            IntPtr intPtr = ObjC.ToNSArray(keys);

            NSObject[] result = ObjC.FromNSArray <NSObject>(Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("objectsForKeys:notFoundMarker:"), intPtr, new NSObject().Handle)).Handle);
            ObjC.ReleaseNSArrayItems(intPtr);
            return(result);
        }
Esempio n. 4
0
        public NSObject ObjectForKey(string key)
        {
            IntPtr   intPtr   = ObjC.ToNSString(key);
            NSObject nSObject = Runtime.GetNSObject <NSObject>(ObjC.MessageSendIntPtr(Handle, Selector.GetHandle("objectForKey:"), intPtr));

            ObjC.MessageSend(intPtr, Selector.ReleaseHandle);
            return(nSObject);
        }
Esempio n. 5
0
        public static NSDictionary FromObjectsAndKeys(NSObject[] objs, string[] keys)
        {
            IntPtr       arg      = ObjC.ToNSArray(objs);
            IntPtr       intPtr   = ObjC.ToNSArray(keys);
            NSDictionary nSObject = Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithObjects:forKeys:"), arg, intPtr));

            ObjC.ReleaseNSArrayItems(intPtr);
            return(nSObject);
        }
Esempio n. 6
0
        public static NSDictionary FromObjectAndKey(NSObject obj, string key)
        {
            IntPtr       intPtr   = ObjC.ToNSString(key);
            NSDictionary nSObject = Runtime.GetNSObject <NSDictionary>(ObjC.MessageSendIntPtr(_classHandle, Selector.GetHandle("dictionaryWithObject:forKey:"), obj.Handle, intPtr));

            ObjC.MessageSend(intPtr, Selector.ReleaseHandle);
            return(nSObject);
        }