System.Xml.Xsl.IlGen.XmlILVisitor.BeforeStartChecks C# (CSharp) Method

BeforeStartChecks() private method

This method is called before calling any WriteEnd??? method. It generates code to perform runtime construction checks separately. This should only be called if the XmlQueryOutput::StartElementChk method will *not* be called.
private BeforeStartChecks ( QilNode ndCtor ) : void
ndCtor QilNode
return void
        private void BeforeStartChecks(QilNode ndCtor) {
            switch (XmlILConstructInfo.Read(ndCtor).InitialStates) {
                case PossibleXmlStates.WithinSequence:
                    // If runtime state is guaranteed to be WithinSequence, then call XmlQueryOutput.StartTree
                    this.helper.CallStartTree(QilConstructorToNodeType(ndCtor.NodeType));
                    break;

                case PossibleXmlStates.EnumAttrs:
                    switch (ndCtor.NodeType) {
                        case QilNodeType.ElementCtor:
                        case QilNodeType.TextCtor:
                        case QilNodeType.RawTextCtor:
                        case QilNodeType.PICtor:
                        case QilNodeType.CommentCtor:
                            // If runtime state is guaranteed to be EnumAttrs, and content is being constructed, call
                            // XmlQueryOutput.StartElementContent
                            this.helper.CallStartElementContent();
                            break;
                    }
                    break;
            }
        }
XmlILVisitor