private static void EnterMonitorAndTryCode(object helper) { ExecuteWithLockHelper helper2 = (ExecuteWithLockHelper)helper; Monitor.Enter(helper2.m_lockObject, ref helper2.m_tookLock); helper2.m_userCode(helper2.m_userState); }
private static void EnterMonitorAndTryCode(Object helper) { ExecuteWithLockHelper execHelper = (ExecuteWithLockHelper)helper; BCLDebug.Assert(execHelper != null, "ExecuteWithLockHelper is null"); BCLDebug.Assert(execHelper.m_lockObject != null, "LockObject is null"); BCLDebug.Assert(execHelper.m_userCode != null, "UserCode is null"); Monitor.ReliableEnter(execHelper.m_lockObject, ref execHelper.m_tookLock); execHelper.m_userCode(execHelper.m_userState); }