System.Xml.Xsl.Runtime.XmlQueryOutput.ConstructInEnumAttrs C# (CSharp) Method

ConstructInEnumAttrs() private method

Ensure that state transitions to EnumAttrs.
private ConstructInEnumAttrs ( XPathNodeType rootType ) : void
rootType XPathNodeType
return void
        private void ConstructInEnumAttrs(XPathNodeType rootType) {
            Debug.Assert(rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace);

            switch (this.xstate) {
                case XmlState.WithinSequence:
                    StartTree(rootType);
                    this.xstate = XmlState.EnumAttrs;
                    break;

                case XmlState.EnumAttrs:
                    // Already in EnumAttrs state
                    break;

                default:
                    // Construction is not allowed in this state
                    ThrowInvalidStateError(rootType);
                    break;
            }
        }