public TKey[] KeysForObject(TValue obj) { if (obj == null) { throw new ArgumentNullException(nameof(obj)); } using (var pool = new NSAutoreleasePool()) return(NSArray.ArrayFromHandle <TKey> (_AllKeysForObject(obj.Handle))); }
protected T[]? GetArray <T> (NSString key) where T : NSObject { if (key is null) { throw new ArgumentNullException(nameof(key)); } var value = CFDictionary.GetValue(Dictionary.Handle, key.Handle); return(NSArray.ArrayFromHandle <T> (value)); }
protected T[] GetArray <T> (NSString key) where T : NSObject { if (key == null) { throw new ArgumentNullException("key"); } var value = CFDictionary.GetValue(Dictionary.Handle, key.Handle); if (value == IntPtr.Zero) { return(null); } return(NSArray.ArrayFromHandle <T> (value)); }
public TValue[] ObjectsForKeys(TKey[] keys, TValue marker) { if (keys == null) { throw new ArgumentNullException(nameof(keys)); } if (marker == null) { throw new ArgumentNullException(nameof(marker)); } if (keys.Length == 0) { return new TValue [] {} } ; return(NSArray.ArrayFromHandle <TValue> (_ObjectsForKeys(NSArray.From <TKey> (keys).Handle, marker.Handle))); }
public T [] ToArray <T> () where T : class, INativeObject { IntPtr nsarr = _AllObjects(); return(NSArray.ArrayFromHandle <T> (nsarr)); }