private void InitSlot(int id, string name, object value, int attributes)
{
object[] array = valueArray;
if (array == null)
{
throw new InvalidOperationException();
}
if (value == null)
{
value = UniqueTag.NULL_VALUE;
}
int index = (id - 1) * SLOT_SPAN;
lock (this)
{
object value2 = array[index];
if (value2 == null)
{
array[index] = value;
array[index + NAME_SLOT] = name;
attributeArray[id - 1] = (short)attributes;
}
else
{
if (!name.Equals(array[index + NAME_SLOT]))
{
throw new InvalidOperationException();
}
}
}
}