public ObjectInstance(object wrappedObject, Dispatcher dispatcher)
        {
            _wrappedObject = wrappedObject;
            _dispatcher    = dispatcher;

            // Create a wrapper around each property.
            _properties = _classInstance.ClassProperties.Select(p => ObjectProperty.From(this, p)).ToList();
        }
Exemple #2
0
        public ObjectProperty LookupProperty(ClassProperty classProperty)
        {
            ObjectProperty objectProperty;

            if (!_properties.TryGetValue(classProperty, out objectProperty))
            {
                objectProperty = ObjectProperty.From(this, classProperty);
                _properties.Add(classProperty, objectProperty);
            }
            return(objectProperty);
        }
        public ObjectInstance(TWrappedObjectType wrappedObject, Tree tree)
        {
            _wrappedObject = wrappedObject;
            _tree          = tree;

            // Create a wrapper around each property.
            _properties = _classInstance.ClassProperties.Select(p => ObjectProperty.From(this, p)).ToList();

            _depNodes = new Dependent(delegate
            {
                foreach (ObjectProperty property in _properties)
                {
                    property.UpdateNodes();
                }
            });
        }