System\Xml\Xsl\Runtime\XmlQueryOutput.cs (67)
44private XmlState _xstate; // Current XML state
65_xstate = XmlState.WithinSequence;
76_xstate = XmlState.WithinContent;
192if (_xstate == XmlState.EnumAttrs)
249if (_xstate == XmlState.WithinNmsp)
418Debug.Assert(_xstate == XmlState.WithinSequence, $"StartTree cannot be called in the {_xstate} state.");
421_xstate = (rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace) ? XmlState.EnumAttrs : XmlState.WithinContent;
429Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"EndTree cannot be called in the {_xstate} state.");
431_xstate = XmlState.WithinSequence;
445Debug.Assert(_xstate == XmlState.WithinContent, $"WriteStartElement cannot be called in the {_xstate} state.");
451_xstate = XmlState.EnumAttrs;
468Debug.Assert(_xstate == XmlState.EnumAttrs, $"StartElementContent cannot be called in the {_xstate} state.");
475_xstate = XmlState.WithinContent;
483Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"WriteEndElement cannot be called in the {_xstate} state.");
485_xstate = XmlState.WithinContent;
503Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteStartAttribute cannot be called in the {_xstate} state.");
505_xstate = XmlState.WithinAttr;
522Debug.Assert(_xstate == XmlState.WithinAttr, $"WriteEndAttribute cannot be called in the {_xstate} state.");
524_xstate = XmlState.EnumAttrs;
538Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteNamespaceDeclaration cannot be called in the {_xstate} state.");
571Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlock cannot be called in the {_xstate} state.");
580Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlockNoEntities cannot be called in the {_xstate} state.");
595if (_xstate != XmlState.WithinSequence)
752_xstate = XmlState.WithinNmsp;
761Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteNamespaceString cannot be called in the {_xstate} state.");
770Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteEndNamespace cannot be called in the {_xstate} state.");
772_xstate = XmlState.EnumAttrs;
791_xstate = XmlState.WithinComment;
800Debug.Assert(_xstate == XmlState.WithinComment, $"WriteCommentString cannot be called in the {_xstate} state.");
809Debug.Assert(_xstate == XmlState.WithinComment, $"WriteEndComment cannot be called in the {_xstate} state.");
813_xstate = XmlState.WithinContent;
834_xstate = XmlState.WithinPI;
843Debug.Assert(_xstate == XmlState.WithinPI, $"WriteProcessingInstructionString cannot be called in the {_xstate} state.");
852Debug.Assert(_xstate == XmlState.WithinPI, $"WriteEndProcessingInstruction cannot be called in the {_xstate} state.");
856_xstate = XmlState.WithinContent;
875if (_xstate == XmlState.WithinSequence)
883Debug.Assert(_xstate == XmlState.WithinSequence, "Values can only be written at the top-level.");
984case XmlState.WithinSequence:
987goto case XmlState.WithinContent;
989case XmlState.WithinContent:
996case XmlState.EnumAttrs:
999goto case XmlState.WithinContent;
1001case XmlState.WithinAttr:
1005case XmlState.WithinNmsp:
1009case XmlState.WithinComment:
1014case XmlState.WithinPI:
1174Debug.Assert(_xstate != XmlState.WithinSequence, "StartCopy should not called if state is WithinSequence");
1205Debug.Assert(_xstate == XmlState.WithinContent, $"EndCopy cannot be called in the {_xstate} state.");
1260case XmlState.WithinSequence:
1263_xstate = XmlState.WithinContent;
1266case XmlState.WithinContent:
1270case XmlState.EnumAttrs:
1291case XmlState.WithinSequence:
1293_xstate = XmlState.EnumAttrs;
1296case XmlState.EnumAttrs:
1328private static XPathNodeType XmlStateToNodeType(XmlState xstate)
1332case XmlState.EnumAttrs: return XPathNodeType.Element;
1333case XmlState.WithinContent: return XPathNodeType.Element;
1334case XmlState.WithinAttr: return XPathNodeType.Attribute;
1335case XmlState.WithinComment: return XPathNodeType.Comment;
1336case XmlState.WithinPI: return XPathNodeType.ProcessingInstruction;
1579if (_xstate == XmlState.WithinContent)