Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ThrowInvalidStateError()

void System.Xml.Xsl.Runtime.XmlQueryOutput.ThrowInvalidStateError ( XPathNodeType constructorType)
inlineprivate

Definition at line 1006 of file XmlQueryOutput.cs.

1007 {
1008 switch (constructorType)
1009 {
1010 case XPathNodeType.Root:
1011 case XPathNodeType.Element:
1012 case XPathNodeType.Text:
1013 case XPathNodeType.ProcessingInstruction:
1014 case XPathNodeType.Comment:
1015 throw new XslTransformException(System.SR.XmlIl_BadXmlState, constructorType.ToString(), XmlStateToNodeType(_xstate).ToString());
1016 case XPathNodeType.Attribute:
1017 case XPathNodeType.Namespace:
1018 if (_depth == 1)
1019 {
1020 throw new XslTransformException(System.SR.XmlIl_BadXmlState, constructorType.ToString(), _rootType.ToString());
1021 }
1022 if (_xstate == XmlState.WithinContent)
1023 {
1024 throw new XslTransformException(System.SR.XmlIl_BadXmlStateAttr, string.Empty);
1025 }
1026 goto case XPathNodeType.Root;
1027 default:
1028 throw new XslTransformException(System.SR.XmlIl_BadXmlState, "Unknown", XmlStateToNodeType(_xstate).ToString());
1029 }
1030 }
static string XmlIl_BadXmlState
Definition SR.cs:2030
static string XmlIl_BadXmlStateAttr
Definition SR.cs:2032
Definition SR.cs:7
XPathNodeType XmlStateToNodeType(XmlState xstate)

References System.Xml.Xsl.Runtime.XmlQueryOutput._depth, System.Xml.Xsl.Runtime.XmlQueryOutput._rootType, System.Xml.Xsl.Runtime.XmlQueryOutput._xstate, System.ToString, System.SR.XmlIl_BadXmlState, System.SR.XmlIl_BadXmlStateAttr, and System.Xml.Xsl.Runtime.XmlQueryOutput.XmlStateToNodeType().

Referenced by System.Xml.Xsl.Runtime.XmlQueryOutput.ConstructInEnumAttrs(), System.Xml.Xsl.Runtime.XmlQueryOutput.ConstructWithinContent(), System.Xml.Xsl.Runtime.XmlQueryOutput.StartCopy(), and System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartRoot().