public void v6()
{
try
{
XmlSchemaSet sc = new XmlSchemaSet();
XmlSchema Schema1 = sc.Add(null, TestData._XsdAuthor);
CError.Compare(sc.Count, 1, "Count after add");
CError.Compare(sc.Contains(Schema1), true, "Contains after add");
sc.Compile();
CError.Compare(sc.Count, 1, "Count");
CError.Compare(sc.Contains(Schema1), true, "Contains");
XmlSchemaElement elementDog = new XmlSchemaElement();
Schema1.Items.Add(elementDog);
elementDog.Name = "dog";
elementDog.SchemaTypeName = new XmlQualifiedName("sstring", "http://www.w3.org/2001/XMLSchema");
sc.Reprocess(Schema1);
CError.Compare(sc.Count, 1, "Count");
CError.Compare(sc.Contains(Schema1), true, "Contains");
CError.Compare(sc.IsCompiled, false, "IsCompiled");
sc.Compile();
CError.Compare(sc.IsCompiled, true, "IsCompiled");
CError.Compare(Schema1.IsCompiled, true, "IsCompiled on SOM");
}
catch (XmlSchemaException e)
{
_output.WriteLine(e.ToString());
return;
}
Assert.True(false);
}