private void PerformActionOnList(IList list, ChangeListAction action, NotifyCollectionChangedEventArgs collectionChangedArgs, Converter <object, object> converter) { StopListeningForChangeEvents(list); action(list, collectionChangedArgs, converter); ListenForChangeEvents(list); }
private void PerformActionOnAllLists(ChangeListAction action, IList sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs) { if (ReferenceEquals(sourceList, this._masterList)) { this.PerformActionOnList(this._targetList, action, collectionChangedArgs, this.ConvertFromMasterToTarget); } else { this.PerformActionOnList(this._masterList, action, collectionChangedArgs, this.ConvertFromTargetToMaster); } }
private void PerformActionOnAllLists(ChangeListAction action, IList sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs) { if (sourceList == _masterList) { PerformActionOnList(_targetList, action, collectionChangedArgs, ConvertFromMasterToTarget); } else { PerformActionOnList(_masterList, action, collectionChangedArgs, ConvertFromTargetToMaster); } }
private void PerformActionOnAllLists(ChangeListAction action, IEnumerable sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs) { if (Equals(sourceList, masterList)) { PerformActionOnList(targetList, action, collectionChangedArgs, ConvertFromMasterToTarget); } else { PerformActionOnList(masterList, action, collectionChangedArgs, ConvertFromTargetToMaster); } }
private void PerformActionOnList(IList list, ChangeListAction action, NotifyCollectionChangedEventArgs collectionChangedArgs, Converter<object, object> converter) { StopListeningForChangeEvents(list); action(list, collectionChangedArgs, converter); ListenForChangeEvents(list); }
void PerformActionOnList(IList list, ChangeListAction action, NotifyCollectionChangedEventArgs collectionChangedArgs) { StopListeningForChangeEvents(list); action(list, collectionChangedArgs); ListenForChangeEvents(list); }
void PerformActionOnAllLists(ChangeListAction action, IList sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs) { PerformActionOnList(sourceList == _masterList ? _targetList : _masterList, action, collectionChangedArgs); }