public void AddRef()
{
Bid.Trace("<ds.Index.AddRef|API> %d#\n", ObjectID);
LockCookie lc = table.indexesLock.UpgradeToWriterLock(-1);
try {
Debug.Assert(0 <= refCount, "AddRef on disposed index");
Debug.Assert(null != records, "null records");
if (refCount == 0)
{
table.ShadowIndexCopy();
table.indexes.Add(this);
}
refCount++;
}
finally {
table.indexesLock.DowngradeFromWriterLock(ref lc);
}
}