private void ReleaseLocks(ref bool thisLockTaken, ref bool sessionHandleLockTaken)
{
Debug.Assert(_thisLock != null, "'_thisLock' MUST NOT be NULL.");
Debug.Assert(SessionHandle != null, "'SessionHandle' MUST NOT be NULL.");
if (thisLockTaken || sessionHandleLockTaken)
{
RuntimeHelpers.PrepareConstrainedRegions();
try
{
}
finally
{
if (thisLockTaken)
{
Monitor.Exit(_thisLock);
thisLockTaken = false;
}
if (sessionHandleLockTaken)
{
Monitor.Exit(SessionHandle);
sessionHandleLockTaken = false;
}
}
}
}