Beispiel #1
0
        public override object Apply(object target)
        {
            var c = _element as NClass;

            c?.BeginPatching();
            try
            {
#if DEBUG
                if (target.GetType() != _element.GetXamlType())
                {
                    throw new InvalidOperationException();
                }
#endif

                for (var i = _head; i != null; i = i.Next)
                {
                    i.Setter?.Invoke(target, i.Value);
                    Finalize(i.Finalizer);
                }
            }
            finally
            {
                c?.EndPatching();
            }
            return(target);
        }
Beispiel #2
0
 NPropDiffer(NElement source, NElement target)
 {
     _source = source;
     _target = target;
     _type   = source.GetXamlType();
     _head   = null;
     _tail   = null;
 }
Beispiel #3
0
 internal static bool ElementEquals(NElement a, NElement b)
 {
     return(a.GetXamlType() == b.GetXamlType() && Equals(a._key, b._key));
 }