// Reads and validated next node from the input data public override bool Read() { switch (_parsingFunction) { case ParsingFunction.Read: if (_coreReader.Read()) { ProcessCoreReaderEvent(); return(true); } else { _validator.CompleteValidation(); return(false); } case ParsingFunction.ParseDtdFromContext: _parsingFunction = ParsingFunction.Read; ParseDtdFromParserContext(); goto case ParsingFunction.Read; case ParsingFunction.Error: case ParsingFunction.ReaderClosed: return(false); case ParsingFunction.Init: _parsingFunction = ParsingFunction.Read; // this changes the value returned by ReadState if (_coreReader.ReadState == ReadState.Interactive) { ProcessCoreReaderEvent(); return(true); } else { goto case ParsingFunction.Read; } case ParsingFunction.ResolveEntityInternally: _parsingFunction = ParsingFunction.Read; ResolveEntityInternally(); goto case ParsingFunction.Read; case ParsingFunction.InReadBinaryContent: _parsingFunction = ParsingFunction.Read; _readBinaryHelper.Finish(); goto case ParsingFunction.Read; default: Debug.Assert(false); return(false); } }
private void FinishReadBinary() { _state = State.Interactive; if (_readBinaryHelper != null) { _readBinaryHelper.Finish(); } }