src/Shared/EntityFramework/Internal/ThrowingMonitor.cs
// <summary>
// Acquires an exclusive lock on this instance.
// Any subsequent call to Enter before a call to Exit will result in an exception.
// </summary>
Acquires an exclusive lock on this instance.
Any subsequent call to Enter before a call to Exit will result in an exception.
Acquires an exclusive lock on this instance . Any subsequent call to Enter before a call to Exit will result in an exception .
public void Enter()
        {
            if (Interlocked.CompareExchange(ref _isInCriticalSection, 1, 0) != 0)
            {
                throw new NotSupportedException(Strings.ConcurrentMethodInvocation);
            }
        }
public void Enter ( ) { if ( Interlocked . CompareExchange ( ref _isInCriticalSection , 1 , 0 ) != 0 ) { throw new NotSupportedException ( Strings . ConcurrentMethodInvocation ) ; } }
Acquires an exclusive lock on this instance.
Acquires an exclusive lock on this instance .