System.Xml.Tests.TC_SchemaSet_ProhibitDTD.v6 C# (CSharp) Method

v6() private method

private v6 ( object param0 ) : void
param0 object
return void
        public void v6(object param0)
        {
            Initialize();
            XmlSchemaSet xss = new XmlSchemaSet();
            xss.XmlResolver = new XmlUrlResolver();
            xss.ValidationEventHandler += ValidationCallback;
            var reader = new XmlTextReader(Path.Combine(TestData._Root, param0.ToString()));
            reader.XmlResolver = new XmlUrlResolver();
            XmlSchema schema = XmlSchema.Read(reader, ValidationCallback);
#pragma warning disable 0618
            schema.Compile(ValidationCallback);
#pragma warning restore 0618

            xss.Add(schema);

            // exepect a validation warning for unresolvable schema location
            CError.Compare(warningCount, 0, "Warning Count mismatch");
            CError.Compare(errorCount, 0, "Error Count mismatch");
            return;
        }