private int AddDictionary(IDictionary value)
{
int index = this.objectTable.Count;
BinaryPlistDictionary dict = new BinaryPlistDictionary(this.objectTable, value.Count);
BinaryPlistItem item = new BinaryPlistItem(dict);
item.IsDictionary = true;
this.objectTable.Add(item);
foreach (object key in value.Keys)
{
dict.KeyReference.Add(this.AddObject(key));
dict.ObjectReference.Add(this.AddObject(value[key]));
this.objectRefCount += 2;
}
if (dict.KeyReference.Count < 15)
{
item.Marker.Add((byte)((byte)0xD0 | (byte)dict.KeyReference.Count));
}
else
{
item.Marker.Add((byte)0xDF);
AddIntegerCount(item.Marker, dict.KeyReference.Count);
}
this.objectTableSize += item.Size;
return index;
}