Beispiel #1
0
        /// <summary>
        /// update the lookups with the new item
        /// 1. create a notifier
        /// 2. add to item -> notifier dictionary
        /// 3. add to key -> items lookup
        /// 4. add to item -> key dictionary
        /// 5. attach to notifier changed event
        /// </summary>
        void _addItemToLookups(object item)
        {
            var notifier = _selectedValuePath.CreateNotifierOn(item);

            _itemToNotifier.Add(item, notifier);
            var key = notifier.Value;

            _keyToItems.Add(key, item);
            _itemToKey.Add(item, key);
            notifier.Changed += Notifier_Changed;
        }
Beispiel #2
0
 public T this[int index]
 {
     get
     {
         var node = _tree[index];
         return(node.Item);
     }
     set
     {
         var node   = _tree[index];
         var oldVal = node.Item;
         _nodes.Remove(oldVal, node);
         node.Item = value;
         _nodes.Add(node.Item, node);
     }
 }
Beispiel #3
0
 private void _onChange(PropertyInfo prop, IChange change)
 {
     _collectionChanges.Add(prop, change);
 }