Exemplo n.º 1
0
        public void GetKeysAndValues(out IntPtr[] keys, out IntPtr[] values)
        {
            int count = this.Length;

            keys   = new IntPtr[count];
            values = new IntPtr[count];
            CFLibrary.CFDictionaryGetKeysAndValues(base.typeRef, keys, values);
        }
Exemplo n.º 2
0
        private string CFDictionary()
        {
            StringBuilder sb   = new StringBuilder();
            string        sxml = CFPropertyList();

            sxml = sxml.Replace("\n", "");
            sb.AppendLine(sxml);
            int nCount = CFLibrary.CFDictionaryGetCount(typeRef);

            IntPtr[] keys   = new IntPtr[nCount];
            IntPtr[] values = new IntPtr[nCount];
            CFLibrary.CFDictionaryGetKeysAndValues(typeRef, keys, values);
            for (int i = 0; i < keys.Length; i++)
            {
                sb.AppendLine(new CFType(keys[i]).ToString() + "=" + new CFType(values[i]).ToString());
            }

            return(sb.ToString());
        }