public void Dispose()
{
lock (this)
{
foreach (ObjectContext o in ContextManager.ObjectContexts)
{
if (o.Loaded)
{
Tpm.FlushContext(o.TheTpmHandle);
}
if (!o.Loaded && o.TheSlotType == SlotType.SessionSlot && ((Object)o.TheTpmHandle) != null)
{
Tpm.FlushContext(o.TheTpmHandle);
}
}
ContextManager.RemoveAll();
}
Tpm.Dispose();
}