System.Xml.Tests.TCGetExpectedParticles.CallForExtendedSequence_Before_After_ValidatingSeqOrAllBaseElements C# (CSharp) Method

CallForExtendedSequence_Before_After_ValidatingSeqOrAllBaseElements() private method

private CallForExtendedSequence_Before_After_ValidatingSeqOrAllBaseElements ( String callOrder ) : void
callOrder String
return void
        public void CallForExtendedSequence_Before_After_ValidatingSeqOrAllBaseElements(String callOrder)
        {
            XmlSchemaValidator val = CreateValidator(XSDFILE_GET_EXPECTED_PARTICLES);
            XmlSchemaInfo info = new XmlSchemaInfo();

            XmlQualifiedName[] names;

            val.Initialize();
            val.ValidateElement("SequenceExtensionElement", "", info);
            val.ValidateEndOfAttributes(null);

            if (callOrder == "before")
            {
                names = new XmlQualifiedName[] { new XmlQualifiedName("elem1") };
            }
            else
            {
                val.ValidateElement("elem1", "", info);
                val.ValidateEndElement(info);
                val.ValidateElement("elem2", "", info);
                val.ValidateEndElement(info);

                names = new XmlQualifiedName[] { new XmlQualifiedName("extended") };
            }

            CheckExpectedElements(val.GetExpectedParticles(), names);

            return;
        }