Esempio n. 1
0
            /// <summary>
            /// Creates a exclusive lock on the path. Internal use only.
            /// </summary>
            internal ExclusiveSinglePathLock(LockManager owner, PathAccessGroupLock groupLock, AbsolutePath path, object accessVerifier)
            {
                Contract.Requires(path.IsValid);
                Contract.Assert(owner.m_accessVerifier == accessVerifier, "ExclusiveSinglePathLock can only be created by a parent PathAccessGroupLock");

                m_owner      = owner;
                m_parentLock = groupLock;

                // Acquire the exclusive lock for the path
                m_pathScope = owner.m_scopedPathLockMap.OpenScope((path, LockType.SinglePath));
                m_pathScope.Value.EnterWriteLock();
            }
Esempio n. 2
0
 /// <summary>
 /// Constructor. Internal access only.
 /// </summary>
 internal Builder(LockManager owner, PathAccessGroupLock pathLock, object accessVerifier)
 {
     Contract.Assert(owner.m_accessVerifier == accessVerifier, "PathAccessLocks can only be created by a parent LockManager");
     m_pathLock = pathLock;
 }