예제 #1
0
 XamlReader GetReader(string filename)
 {
     return(new XamlXmlReader(XmlReader.Create(Compat.GetTestFile(filename), new XmlReaderSettings()
     {
         CloseInput = true
     })));
 }
예제 #2
0
        XamlReader GetReader(string filename)
        {
            string xml = File.ReadAllText(Compat.GetTestFile(filename)).UpdateXml();

            return(new XamlXmlReader(XmlReader.Create(new StringReader(xml)), new XamlXmlReaderSettings {
                ProvideLineInfo = true
            }));
        }
예제 #3
0
        public void PassesNullToGetXamlType_typeArguments_ForNoArguments()
        {
            var xml    = File.ReadAllText(Compat.GetTestFile("Int32.xml")).UpdateXml();
            var ctx    = new TestGetXamlTypeArgumentsNull();
            var reader = new XamlXmlReader(new StringReader(xml), ctx);
            var writer = new XamlObjectWriter(ctx);

            XamlServices.Transform(reader, writer);

            Assert.True(ctx.Invoked);
        }
예제 #4
0
 string ReadXml(string name)
 {
     return(File.ReadAllText(Compat.GetTestFile(name)).Trim().UpdateXml());
 }