internal bool BeginEvent(XPathNodeType nodeType, string prefix, string name, string nspace, bool empty, object htmlProps, bool search) { Debug.Assert(_xsm != null); int stateOutlook = _xsm.BeginOutlook(nodeType); if (_ignoreLevel > 0 || stateOutlook == StateMachine.Error) { _ignoreLevel++; return(true); // We consumed the event, so pretend it was output. } switch (_builder.BeginEvent(stateOutlook, nodeType, prefix, name, nspace, empty, htmlProps, search)) { case OutputResult.Continue: _xsm.Begin(nodeType); Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State); Debug.Assert(ExecutionResult == ExecResult.Continue); return(true); case OutputResult.Interrupt: _xsm.Begin(nodeType); Debug.Assert(StateMachine.StateOnly(stateOutlook) == _xsm.State); ExecutionResult = ExecResult.Interrupt; return(true); case OutputResult.Overflow: ExecutionResult = ExecResult.Interrupt; return(false); case OutputResult.Error: _ignoreLevel++; return(true); case OutputResult.Ignore: return(true); default: Debug.Fail("Unexpected result of RecordBuilder.BeginEvent()"); return(true); } }
internal bool BeginEvent(XPathNodeType nodeType, string?prefix, string?name, string?nspace, bool empty, object?htmlProps, bool search) { Debug.Assert(_xsm != null); int stateOutlook = _xsm.BeginOutlook(nodeType); if (_ignoreLevel > 0 || stateOutlook == StateMachine.Error) { _ignoreLevel++; return(true); // We consumed the event, so pretend it was output. } switch (_builder !.BeginEvent(stateOutlook, nodeType, prefix, name, nspace, empty, htmlProps, search)) {