System\Xml\Xsl\Runtime\XmlQueryOutput.cs (67)
44private XmlState _xstate; // Current XML state
65_xstate = XmlState.WithinSequence;
76_xstate = XmlState.WithinContent;
193if (_xstate == XmlState.EnumAttrs)
250if (_xstate == XmlState.WithinNmsp)
419Debug.Assert(_xstate == XmlState.WithinSequence, $"StartTree cannot be called in the {_xstate} state.");
422_xstate = (rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace) ? XmlState.EnumAttrs : XmlState.WithinContent;
430Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"EndTree cannot be called in the {_xstate} state.");
432_xstate = XmlState.WithinSequence;
446Debug.Assert(_xstate == XmlState.WithinContent, $"WriteStartElement cannot be called in the {_xstate} state.");
452_xstate = XmlState.EnumAttrs;
469Debug.Assert(_xstate == XmlState.EnumAttrs, $"StartElementContent cannot be called in the {_xstate} state.");
476_xstate = XmlState.WithinContent;
484Debug.Assert(_xstate == XmlState.EnumAttrs || _xstate == XmlState.WithinContent, $"WriteEndElement cannot be called in the {_xstate} state.");
486_xstate = XmlState.WithinContent;
504Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteStartAttribute cannot be called in the {_xstate} state.");
506_xstate = XmlState.WithinAttr;
523Debug.Assert(_xstate == XmlState.WithinAttr, $"WriteEndAttribute cannot be called in the {_xstate} state.");
525_xstate = XmlState.EnumAttrs;
539Debug.Assert(_xstate == XmlState.EnumAttrs, $"WriteNamespaceDeclaration cannot be called in the {_xstate} state.");
572Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlock cannot be called in the {_xstate} state.");
581Debug.Assert(_xstate != XmlState.WithinSequence && _xstate != XmlState.EnumAttrs, $"WriteTextBlockNoEntities cannot be called in the {_xstate} state.");
596if (_xstate != XmlState.WithinSequence)
753_xstate = XmlState.WithinNmsp;
762Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteNamespaceString cannot be called in the {_xstate} state.");
771Debug.Assert(_xstate == XmlState.WithinNmsp, $"WriteEndNamespace cannot be called in the {_xstate} state.");
773_xstate = XmlState.EnumAttrs;
792_xstate = XmlState.WithinComment;
801Debug.Assert(_xstate == XmlState.WithinComment, $"WriteCommentString cannot be called in the {_xstate} state.");
810Debug.Assert(_xstate == XmlState.WithinComment, $"WriteEndComment cannot be called in the {_xstate} state.");
814_xstate = XmlState.WithinContent;
835_xstate = XmlState.WithinPI;
844Debug.Assert(_xstate == XmlState.WithinPI, $"WriteProcessingInstructionString cannot be called in the {_xstate} state.");
853Debug.Assert(_xstate == XmlState.WithinPI, $"WriteEndProcessingInstruction cannot be called in the {_xstate} state.");
857_xstate = XmlState.WithinContent;
876if (_xstate == XmlState.WithinSequence)
884Debug.Assert(_xstate == XmlState.WithinSequence, "Values can only be written at the top-level.");
985case XmlState.WithinSequence:
988goto case XmlState.WithinContent;
990case XmlState.WithinContent:
997case XmlState.EnumAttrs:
1000goto case XmlState.WithinContent;
1002case XmlState.WithinAttr:
1006case XmlState.WithinNmsp:
1010case XmlState.WithinComment:
1015case XmlState.WithinPI:
1175Debug.Assert(_xstate != XmlState.WithinSequence, "StartCopy should not called if state is WithinSequence");
1206Debug.Assert(_xstate == XmlState.WithinContent, $"EndCopy cannot be called in the {_xstate} state.");
1261case XmlState.WithinSequence:
1264_xstate = XmlState.WithinContent;
1267case XmlState.WithinContent:
1271case XmlState.EnumAttrs:
1292case XmlState.WithinSequence:
1294_xstate = XmlState.EnumAttrs;
1297case XmlState.EnumAttrs:
1329private static XPathNodeType XmlStateToNodeType(XmlState xstate)
1333case XmlState.EnumAttrs: return XPathNodeType.Element;
1334case XmlState.WithinContent: return XPathNodeType.Element;
1335case XmlState.WithinAttr: return XPathNodeType.Attribute;
1336case XmlState.WithinComment: return XPathNodeType.Comment;
1337case XmlState.WithinPI: return XPathNodeType.ProcessingInstruction;
1580if (_xstate == XmlState.WithinContent)