Example #1
0
        // Token: 0x06000012 RID: 18 RVA: 0x0000248C File Offset: 0x0000068C
        private unsafe static string GetStringFromObject(void *obj)
        {
            int num = CFDictParser.CFStringGetLength(obj);

            CFDictParser.__CFRange range = default(CFDictParser.__CFRange);
            range.length   = num;
            range.location = 0;
            char[] array = new char[num];
            CFDictParser.CFStringGetCharacters(obj, range, Marshal.UnsafeAddrOfPinnedArrayElement(array, 0));
            return(new string(array));
        }
Example #2
0
        // Token: 0x06000013 RID: 19 RVA: 0x000024D8 File Offset: 0x000006D8
        private unsafe static Array GetArrayFromObject(void *obj)
        {
            int num = CFDictParser.CFArrayGetCount(obj);

            object[] array  = new object[num];
            void *[] array2 = new void *[num];
            CFDictParser.__CFRange _CFRange = default(CFDictParser.__CFRange);
            _CFRange.length   = num;
            _CFRange.location = 0;
            for (int i = 0; i < num; i++)
            {
                array2[i] = CFDictParser.CFArrayGetValueAtIndex(obj, i);
            }
            for (int i = 0; i < num; i++)
            {
                array[i] = CFDictParser.ParseObject(array2[i], null);
            }
            return(array);
        }
Example #3
0
 private unsafe static extern void CFStringGetCharacters(void *obj, CFDictParser.__CFRange range, IntPtr buffer);
Example #4
0
 private unsafe static extern void CFDataGetBytes(void *obj, CFDictParser.__CFRange range, IntPtr buffer);
Example #5
0
 private unsafe static extern void CFArrayGetValues(void *array, CFDictParser.__CFRange range, void *[] values);