private void PerformActionOnList( IList list, TwoListSynchronizer.ChangeListAction action, NotifyCollectionChangedEventArgs collectionChangedArgs, Converter <object, object> converter) { this.StopListeningForChangeEvents(list); action(list, collectionChangedArgs, converter); this.ListenForChangeEvents(list); }
private void PerformActionOnAllLists( TwoListSynchronizer.ChangeListAction action, IList sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs) { if (sourceList == this._masterList) { this.PerformActionOnList(this._targetList, action, collectionChangedArgs, new Converter <object, object>(this.ConvertFromMasterToTarget)); } else { this.PerformActionOnList(this._masterList, action, collectionChangedArgs, new Converter <object, object>(this.ConvertFromTargetToMaster)); } }