コード例 #1
0
        public void XmlResolverRemoveWithValidData()
        {
            var xmlResolver = new XmlPreloadedResolver(XmlKnownDtds.Xhtml10);

            byte[]       data   = "hello world" u8.ToArray();
            MemoryStream stream = new MemoryStream(data);

            xmlResolver.Add(new Uri("-//W3C//DTD XHTML 1.0 Transitional//EN", UriKind.RelativeOrAbsolute), stream);
            xmlResolver.Remove(new Uri("-//W3C//DTD XHTML 1.0 Transitional//EN", UriKind.RelativeOrAbsolute));
        }
コード例 #2
0
        public void XmlResolverRemoveWithInvalidData()
        {
            var xmlResolver = new XmlPreloadedResolver(XmlKnownDtds.Xhtml10);

            Assert.Throws <ArgumentNullException>(() => xmlResolver.Remove(null));
        }