PTXWriterState RequirePop(PTXWriterStateType requiredType) { if (this.states.Peek().State == requiredType) { return(PopState()); } else { throw PropertyTreesFailure.WouldCreateMalformedDocument(); } }
PTXWriterState RequirePeek(PTXWriterStateType requiredType) { if (this.states.Peek().State == requiredType) { return(this.states.Peek()); } else { throw PropertyTreesFailure.WriterIncorrectState(this.WriteState); } }
PTXWriterState RequirePop(PTXWriterStateType requiredType) { if (this.states.Peek().State == requiredType) return PopState(); else throw PropertyTreesFailure.WouldCreateMalformedDocument(); }
PTXWriterState RequirePeek(PTXWriterStateType requiredType) { if (this.states.Peek().State == requiredType) { return this.states.Peek(); } else throw PropertyTreesFailure.WriterIncorrectState(this.WriteState); }