System.Xml.Tests.TCGetExpectedParticles.CallForAllAfterValidating_1_2_element C# (CSharp) Méthode

CallForAllAfterValidating_1_2_element() private méthode

private CallForAllAfterValidating_1_2_element ( string elemAfter ) : void
elemAfter string
Résultat void
        public void CallForAllAfterValidating_1_2_element(string elemAfter)
        {
            XmlSchemaValidator val = CreateValidator(XSDFILE_GET_EXPECTED_PARTICLES);
            XmlSchemaInfo info = new XmlSchemaInfo();

            string elem = elemAfter;
            string notElem = (elem == "elem1" ? "elem2" : "elem1");

            val.Initialize();
            val.ValidateElement("AllElement", "", info);
            val.ValidateAttribute("attr1", "", StringGetter("foo"), info);
            val.ValidateAttribute("attr2", "", StringGetter("foo"), info);
            val.ValidateEndOfAttributes(null);

            val.ValidateElement(elem, "", info);
            val.SkipToEndElement(info);

            CheckExpectedElements(val.GetExpectedParticles(), new XmlQualifiedName[] { new XmlQualifiedName(notElem) });

            return;
        }