XamlReader GetReader(string filename) { return(new XamlXmlReader(XmlReader.Create(Compat.GetTestFile(filename), new XmlReaderSettings() { CloseInput = true }))); }
XamlReader GetReader(string filename) { string xml = File.ReadAllText(Compat.GetTestFile(filename)).UpdateXml(); return(new XamlXmlReader(XmlReader.Create(new StringReader(xml)), new XamlXmlReaderSettings { ProvideLineInfo = true })); }
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); }
string ReadXml(string name) { return(File.ReadAllText(Compat.GetTestFile(name)).Trim().UpdateXml()); }