/*=========================================================================
** Retrieves the value from the specified slot.
** =========================================================================*/
public Object GetData(LocalDataStoreSlot slot)
{
Object o = null;
// Validate the slot.
m_Manager.ValidateSlot(slot);
// Cache the slot index to avoid synchronization issues.
int slotIdx = slot.Slot;
if (slotIdx >= 0)
{
// Delay expansion of m_DataTable if we can
if (slotIdx >= m_DataTable.Length)
{
return(null);
}
// Retrieve the data from the given slot.
o = m_DataTable[slotIdx];
}
// Check if the slot has become invalid.
if (!slot.IsValid())
{
throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_SlotHasBeenFreed"));
}
return(o);
}