private protected override void OnDispose()
        {
            using (var listLock = this._childScopes.Lock())
            {
                // dispose child scopes in reverse order of creation
                for (var f = this._childScopes.Count; f > 0; f--)
                {
                    this._childScopes[f - 1].Dispose();
                }
            }

            this._childScopes = null;
        }
예제 #2
0
 internal ListLock(LockedList <T> list)
 {
     this._list = list;
     Monitor.Enter(this._list._locker);
 }