public void Remove(int itemIndex)
{
if (this.isClosed)
{
throw new JSVsaException(JSVsaError.EngineClosed);
}
this.TryObtainLock();
try
{
if ((0 > itemIndex) || (itemIndex >= this.items.Count))
{
throw new JSVsaException(JSVsaError.ItemNotFound);
}
VsaItem item = (VsaItem)this.items[itemIndex];
item.Remove();
this.items.RemoveAt(itemIndex);
if (item is VsaStaticCode)
{
this.staticCodeBlockCount--;
}
}
finally
{
this.ReleaseLock();
}
}