private void ExitContext <T>() where T : ExtractContext.PropertyBagContainer { if (this.containerStack.Count > 0) { ExtractContext.PropertyBagContainer propertyBagContainer = this.containerStack.Pop(); if (propertyBagContainer is T) { propertyBagContainer.Save(); if (this.containerStack.Count > 0) { this.CurrentPropertyBag = this.containerStack.Peek().PropertyBag; return; } this.CurrentPropertyBag = null; return; } } throw new ExportException(ExportErrorType.MessageDataCorrupted); }
private void EnterContext(ExtractContext.PropertyBagContainer container) { this.containerStack.Push(container); this.CurrentPropertyBag = container.PropertyBag; }