Пример #1
0
        private string Verify(object data)
        {
            var ms = new MicrosoftXamlServices();
            var fx = new FastXamlServices();

            var exp = ms.Save(data);

            WriteTrace(exp, "Expected");
            var act = new FastXamlServices().Save(data);

            WriteTrace(act, "Actual");

            var reSaveMs = ms.Save(ms.Parse(act));

            WriteTrace(reSaveMs, "Resaved via Microsoft XamlServices");
            Assert.AreEqual(exp, reSaveMs);

            var reSaveFx = fx.Save(fx.Parse(act));

            WriteTrace(reSaveFx, "Resaved via FastXamlServices");
            Assert.AreEqual(act, reSaveFx);


            if (!string.Equals(exp, act, StringComparison.Ordinal))
            {
                _notExact = true;
            }

            return(act);
        }
 protected override T Load <T>(string xaml)
 {
     return((T)_fxs.Parse(xaml));
 }