Beispiel #1
0
        public void SetValue(CompositeObject owner,
                             CompositeObjectProperty prop,
                             IPropertyValue value)
        {
            Dictionary <CompositeObjectProperty, IPropertyValue> props;

            if (!_valueStorage.TryGetValue(owner, out props))
            {
                props = new Dictionary <CompositeObjectProperty, IPropertyValue>();
                _valueStorage.Add(owner, props);
            }

            var oldValue = props[prop];

            props[prop] = value;
            oldValue.OnDetached(owner, prop);
            value.OnAttached(owner, prop);
        }