public IXamlMember GetMember(string name)
        {
            CustomMemberProvider member;

            if (!_members.TryGetValue(name, out member))
            {
                member = CustomMemberProvider.For(this, _type, name);
                if (member != null)
                {
                    _members.Add(name, member);
                }
            }
            return(member);
        }
        public ObjectProperty LookupProperty(CustomMemberProvider provider)
        {
            ObjectProperty dependentProperty;

            if (!_propertyByName.TryGetValue(provider, out dependentProperty))
            {
                PropertyInfo propertyInfo = _wrappedObject.GetType().GetRuntimeProperty(provider.Name);
                if (propertyInfo == null)
                {
                    return(null);
                }

                dependentProperty = new ObjectProperty(this, _wrappedObject, propertyInfo, provider);
                _propertyByName.Add(provider, dependentProperty);
            }
            return(dependentProperty);
        }
        public ObjectProperty(IObjectInstance wrapper, object wrappedObject, PropertyInfo propertyInfo, CustomMemberProvider provider)
        {
            _wrapper       = wrapper;
            _wrappedObject = wrappedObject;
            _propertyInfo  = propertyInfo;
            _provider      = provider;

            if (_provider.IsCollection)
            {
                _collection = new ObservableCollection <object>();
                _value      = _collection;
            }

            _depValue              = new Dependent(UpdateValue);
            _depValue.Invalidated += ValueInvalidated;
            UpdateNow();
        }