System.Xml.Tests.TC_SchemaSet_Includes.v10 C# (CSharp) Méthode

v10() private méthode

private v10 ( ) : void
Résultat void
        public void v10()
        {
            XmlSchemaSet sc = new XmlSchemaSet();
            sc.XmlResolver = new XmlUrlResolver();
            int elem_count = 0;

            XmlSchema schema = sc.Add(null, Path.Combine(TestData._Root, "include_v10_a.xsd"));
            CError.Compare(sc.Count, 1, "AddCount");
            CError.Compare(sc.IsCompiled, false, "AddIsCompiled");

            sc.Compile();
            CError.Compare(sc.IsCompiled, true, "IsCompiled");
            CError.Compare(sc.Count, 1, "Count");

            // Check that C's data is present in A's NS
            foreach (object obj in schema.Elements.Names)
                if ((obj.ToString()).Equals("c-e2"))
                    elem_count++;
            CError.Compare(elem_count, 1, "c-e2");
            elem_count = 0;
            // Check that B's data is present in A's NS
            foreach (object obj in schema.Elements.Names)
                if ((obj.ToString()).Equals("b-e1"))
                    elem_count++;
            CError.Compare(elem_count, 1, "b-e1");

            return;
        }