public void QuickClose() { if (ReportStack.Any()) { ReportStack.Peek().QuickClose(); } }
public void PopReport() { if (!ReportStack.Any()) { throw new InvalidOperationException("Stack is empty"); } 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; }
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; }