コード例 #1
0
 /// <summary>
 /// Removes the scope from the scope stack.
 /// </summary>
 /// <param name="scope">Scope to be removed.</param>
 private void ExitScope(TransformationScope scope)
 {
     lock (this.scopeStack)
     {
         ExceptionUtilities.Assert(object.ReferenceEquals(scope, this.scopeStack.Peek()), "Wrong scope given when exiting.");
         this.scopeStack.Pop();
     }
 }
コード例 #2
0
 private IDisposable ApplyScope(TransformationScope scope)
 {
     lock (this.scopeStack)
     {
         this.scopeStack.Push(scope);
         return(new DelegateBasedDisposable(() => this.ExitScope(scope)));
     }
 }