/// <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(); }
/// <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; }