private int AddDate(DateTime value)
{
if (!this.uniques.Contains(value))
{
int index = this.objectTable.Count;
byte[] buffer = BitConverter.GetBytes(value.ToUniversalTime().Subtract(ReferenceDate).TotalSeconds);
if (BitConverter.IsLittleEndian)
{
Array.Reverse(buffer);
}
BinaryPlistItem item = new BinaryPlistItem(value);
item.Marker.Add((byte)0x33);
item.SetByteValue(buffer);
this.objectTable.Add(item);
this.objectTableSize += item.Size;
this.uniques.SetIndex(value, index);
return index;
}
return this.uniques.GetIndex(value);
}