public LockLevelException(LeveledLock currentLock, LeveledLock newLock) : base(string.Format("You attempted to violate the locking protocol by acquiring lock {0} " + "while the thread already owns lock {1}.", currentLock, newLock)) {}
static void Test4() { LeveledLock la = new LeveledLock(10, false, "A"); Console.WriteLine("Test4..."); using (la.Enter()) { Console.WriteLine(" Got A"); using (la.Enter()) { Console.WriteLine(" Got A"); } Console.WriteLine(" Released A"); } Console.WriteLine(" Released A"); }
// Constructor internal LeveledLockCookie(LeveledLock lck) { this._lck = lck; }