src/Shared/EntityFramework/Internal/ThrowingMonitor.cs
// <summary>
// Throws an exception if an exclusive lock has been acquired on this instance.
// </summary>
Throws an exception if an exclusive lock has been acquired on this instance.
Throws an exception if an exclusive lock has been acquired on this instance .
public void EnsureNotEntered()
        {
            Thread.MemoryBarrier();
            if (_isInCriticalSection != 0)
            {
                throw new NotSupportedException(Strings.ConcurrentMethodInvocation);
            }
        }
public void EnsureNotEntered ( ) { Thread . MemoryBarrier ( ) ; if ( _isInCriticalSection != 0 ) { throw new NotSupportedException ( Strings . ConcurrentMethodInvocation ) ; } }
Throws an exception if an exclusive lock has been acquired on this instance.
Throws an exception if an exclusive lock has been acquired on this instance .
// Ensure the value read from _isInCriticalSection is fresh