public static string Serialize(object obj) { using (MemoryStream xamlStream = new MemoryStream()) { XamlTestDriver.Serialize(obj, xamlStream); xamlStream.Position = 0; return(XamlTestDriver.GetStringFromMemoryStream(xamlStream)); } }
static void TraceXamlFile(MemoryStream xamlStream) { XamlTestDriver.TraceXamlFile(XamlTestDriver.GetStringFromMemoryStream(xamlStream)); xamlStream.Position = 0; }