System.Runtime.Serialization.Plists.BinaryPlistWriter.AddInteger C# (CSharp) Method

AddInteger() private method

Adds an integer to the internal object table.
private AddInteger ( long value ) : int
value long The value to add.
return int
        private int AddInteger(long value)
        {
            if (!this.uniques.Contains(value))
            {
                int index = this.objectTable.Count;

                BinaryPlistItem item = new BinaryPlistItem(value);
                item.SetByteValue(GetIntegerBytes(value));
                item.Marker.Add((byte)((byte)0x10 | (byte)Math.Log(item.ByteValue.Count, 2)));

                this.objectTable.Add(item);
                this.objectTableSize += item.Size;

                this.uniques.SetIndex(value, index);
                return index;
            }

            return this.uniques.GetIndex(value);
        }