src/Misc/EFTools/XmlCore/Model/StandAlone/VanillaXmlModelProvider.cs
/// <summary>
/// Release a lock on the passed in transaction context with
/// the specified mode. Return immediately if the context does
/// not hold a lock for this mode.
/// </summary>
/// <param name="context">the context for which to remove the lock</param>
/// <param name="request">the mode of the lock to be released</param>
Release a lock on the passed in transaction context with
the specified mode. Return immediately if the context does
not hold a lock for this mode.
Release a lock on the passed in transaction context with the specified mode . Return immediately if the context does not hold a lock for this mode .
public void Unregister(SimpleTransaction context, LockMode request)
            {
                var transactionList = GetTransactionList(request);
                if (transactionList == null
                    || !transactionList.ContainsKey(context))
                {
                    return;
                }
                transactionList.Remove(context);
                for (var l = request; l > LockMode.Null; _lockMode = --l)
                {
                    var nextTransactionList = GetTransactionList(l);
                    if (nextTransactionList == null)
                    {
                        continue;
                    }
                    if (nextTransactionList.Count > 0)
                    {
                        break;
                    }
                }
                if (request > _lockMode)
                {
                    if (_autoResetEvent != null)
                    {
                        _autoResetEvent.Set();
                    }
                }
            }
public void Unregister ( SimpleTransaction context , LockMode request ) { var transactionList = GetTransactionList ( request ) ; if ( transactionList == null || ! transactionList . ContainsKey ( context ) ) { return ; } transactionList . Remove ( context ) ; for ( var l = request ; l > LockMode . Null ; _lockMode = -- l ) { var nextTransactionList = GetTransactionList ( l ) ; if ( nextTransactionList == null ) { continue ; } if ( nextTransactionList . Count > 0 ) { break ; } } if ( request > _lockMode ) { if ( _autoResetEvent != null ) { _autoResetEvent . Set ( ) ; } } }
Release a lock on the passed in transaction context with
the specified mode.
Release a lock on the passed in transaction context with the specified mode .
// First get the hash table for this lock mode // This transaction wasn't registered, return immediately // recalculate the strongest lock mode // if anyone was waiting for this lock, they should recheck
context
SimpleTransaction
the context for which to remove the lock
the context for which to remove the lock
request
LockMode
the mode of the lock to be released
the mode of the lock to be released