예제 #1
0
 public void QuickClose()
 {
     if (ReportStack.Any())
     {
         ReportStack.Peek().QuickClose();
     }
 }
예제 #2
0
        public void PopReport()
        {
            if (!ReportStack.Any())
            {
                throw new InvalidOperationException("Stack is empty");
            }

            ReportStack.Peek().QuickClose(); // DM - this code simulates calling Report's destructor at this moment
            ReportStack.Pop();

            // There should always be the "default report" waiting on the stack.
            if (!ReportStack.Any())
            {
                throw new InvalidOperationException("Stack is empty");
            }
            Scope.DefaultScope = Report;
        }
예제 #3
0
 public void PushReport()
 {
     ReportStack.Push(new Report(ReportStack.Peek()));
     Scope.DefaultScope = Report;
 }