Exemple #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;
        }