public SelectionHelperBehavior(FasterMultiSelectListBox listBox) { _listBox = listBox; _itemToNotifier = new Dictionary <object, BindingNotifyier>(); _keyToItems = new EditableLookup <object, object>(); _itemToKey = new Dictionary <object, object>(); ListBoxSelectedItems_Initialized(); }
public static EditableLookup <K, T> ToEditableLookup <K, T>(this IEnumerable <IGrouping <K, T> > source) { var res = new EditableLookup <K, T>(); foreach (var grouping in source) { res.Reset(grouping.Key, grouping); } return(res); }
public AccessInterceptor(InterfaceState state, bool allowModifications = false) { _state = state; _allowModifications = allowModifications; _oldValues = state.Properties.ToDictionary(p => p, p => state[p]); _oldCollectionValues = state.CollectionProperties .ToDictionary(p => p, p => (state[p] as IEnumerable).Cast <object>().ToArray()); _collectionChanges = new EditableLookup <PropertyInfo, IChange>(); _literalChanges = new Dictionary <PropertyInfo, object>(); _proxies = new Dictionary <PropertyInfo, IStateList>(); }
public AvlList() { _tree = new OrderedAvlTree <T>(); _nodes = new EditableLookup <T, AvlTreeNode <T> >(); }
public void Clear() { _nodes = new EditableLookup <T, AvlTreeNode <T> >(); _tree = new OrderedAvlTree <T>(); }
public void Reset(IEnumerable <T> items) { _tree = new OrderedAvlTree <T>(items); _nodes = _tree.ToEditableLookup(node => node.Item); }