Exemplo n.º 1
0
 XamlReader GetReader(string filename)
 {
     return(new XamlXmlReader(XmlReader.Create(Compat.GetTestFile(filename), new XmlReaderSettings()
     {
         CloseInput = true
     })));
 }
Exemplo n.º 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
            }));
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 string ReadXml(string name)
 {
     return(File.ReadAllText(Compat.GetTestFile(name)).Trim().UpdateXml());
 }