Beispiel #1
0
        public VirtualObservableNode CreateVirtualChild(string name, Type contentType, bool isPrimitive, int?order, object index, Func <object> getter, Action <object> setter, IReadOnlyDictionary <string, object> nodeAssociatedData = null)
        {
            var observableChild = VirtualObservableNode.Create(Owner, name, contentType, isPrimitive, order, index, getter, setter);

            nodeAssociatedData?.ForEach(x => observableChild.AddAssociatedData(x.Key, x.Value));
            observableChild.FinalizeChildrenInitialization();
            AddChild(observableChild);
            return(observableChild);
        }
Beispiel #2
0
        public VirtualObservableNode CreateVirtualChild(string name, Type contentType, int?order, object initialValue, NodeCommandWrapperBase valueChangedCommand = null, IReadOnlyDictionary <string, object> nodeAssociatedData = null)
        {
            var observableChild = VirtualObservableNode.Create(Owner, name, this, order, contentType, initialValue, valueChangedCommand);

            if (nodeAssociatedData != null)
            {
                foreach (var data in nodeAssociatedData)
                {
                    observableChild.AddAssociatedData(data.Key, data.Value);
                }
            }
            AddChild(observableChild);
            return(observableChild);
        }