public static bool GetBooleanValue(IntPtr theDict, IntPtr key) { var value = GetValue(theDict, key); if (value == IntPtr.Zero) { return(false); } return(CFBoolean.GetValue(value)); }
static CFBoolean () { var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0); if (handle == IntPtr.Zero) return; try { True = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanTrue"), false); False = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanFalse"), false); } finally { Dlfcn.dlclose (handle); } }
static CFBoolean() { var handle = Dlfcn.dlopen(Constants.CoreFoundationLibrary, 0); if (handle == IntPtr.Zero) { return; } try { True = new CFBoolean(Dlfcn.GetIntPtr(handle, "kCFBooleanTrue"), false); False = new CFBoolean(Dlfcn.GetIntPtr(handle, "kCFBooleanFalse"), false); } finally { Dlfcn.dlclose(handle); } }