Beispiel #1
0
 internal virtual void Free()
 {
     for (var i = _props.Head; i != null; i = i.Next)
     {
         NPatch.Finalize(i._value);
     }
 }
Beispiel #2
0
        internal override void Free()
        {
            Xaml = null;

            for (var i = _propsCommitted.Head; i != null; i = i.Next)
            {
                NPatch.Finalize(i._value);
            }

            for (var i = _stateCommitted.Head; i != null; i = i.Next)
            {
                NPatch.Finalize(i._value);
            }

            _ui?.Free();
        }
Beispiel #3
0
        public void Run(NListPatchEntry head)
        {
            for (var i = head; i != null; i = i.Next)
            {
                switch (i.Op)
                {
                case NListPatchOp.Insert: DoInsert(i); break;

                case NListPatchOp.Remove: DoRemove(i); break;

                case NListPatchOp.Patch: DoPatch(i); break;

                case NListPatchOp.Move: DoMove(i); break;
                }

                NPatch.Finalize(i.Finalizer);
            }
        }
Beispiel #4
0
        static void SetRenderElement(DependencyObject d, DependencyPropertyChangedEventArgs args)
        {
            NPatch.Finalize(args.OldValue);

            var e = (NElement)args.NewValue;

            if (e == null)
            {
                return;
            }

            var cc = d as ContentControl;

            if (cc != null)
            {
                cc.Render(e); return;
            }

            var uc = d as UserControl;

            if (uc != null)
            {
                uc.Render(e); return;
            }

#if !NETFX_CORE
            var w = d as Window;
            if (w != null)
            {
                w.Render(e); return;
            }
#endif

            var b = d as Border;
            if (b != null)
            {
                b.Render(e); return;
            }

            throw new NotSupportedException();
        }