C# Class FloydPink.Flickr.Downloadr.UI.Behaviors.TwoListSynchronizer

Keeps two lists synchronized.
Inheritance: IWeakEventListener
Mostrar archivo Open project: flickr-downloadr/flickr-downloadr Class Usage Examples

Public Methods

Method Description
ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool

Receives events from the centralized event manager.

StartSynchronizing ( ) : void

Starts synchronizing the lists.

StopSynchronizing ( ) : void

Stop synchronizing the lists.

TwoListSynchronizer ( IList masterList, IList targetList ) : System

Initializes a new instance of the TwoListSynchronizer class.

TwoListSynchronizer ( IList masterList, IList targetList, IListItemConverter masterTargetConverter ) : System

Initializes a new instance of the TwoListSynchronizer class.

Protected Methods

Method Description
ListenForChangeEvents ( IList list ) : void

Listens for change events on a list.

StopListeningForChangeEvents ( IList list ) : void

Stops listening for change events.

Private Methods

Method Description
AddItems ( IList list, NotifyCollectionChangedEventArgs e, object>.Converter converter ) : void
ConvertFromMasterToTarget ( object masterListItem ) : object
ConvertFromTargetToMaster ( object targetListItem ) : object
HandleCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
MoveItems ( IList list, NotifyCollectionChangedEventArgs e, object>.Converter converter ) : void
PerformActionOnAllLists ( ChangeListAction action, IList sourceList, NotifyCollectionChangedEventArgs collectionChangedArgs ) : void
PerformActionOnList ( IList list, ChangeListAction action, NotifyCollectionChangedEventArgs collectionChangedArgs, object>.Converter converter ) : void
RemoveItems ( IList list, NotifyCollectionChangedEventArgs e, object>.Converter converter ) : void
ReplaceItems ( IList list, NotifyCollectionChangedEventArgs e, object>.Converter converter ) : void
SetListValuesFromSource ( IList sourceList, IList targetList, object>.Converter converter ) : void
TargetAndMasterCollectionsAreEqual ( ) : bool
UpdateListsFromSource ( IList sourceList ) : void

Makes sure that all synchronized lists have the same values as the source list.

Method Details

ListenForChangeEvents() protected method

Listens for change events on a list.
protected ListenForChangeEvents ( IList list ) : void
list IList The list to listen to.
return void

ReceiveWeakEvent() public method

Receives events from the centralized event manager.
public ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool
managerType System.Type /// The type of the calling this method. ///
sender object Object that originated the event.
e System.EventArgs Event data.
return bool

StartSynchronizing() public method

Starts synchronizing the lists.
public StartSynchronizing ( ) : void
return void

StopListeningForChangeEvents() protected method

Stops listening for change events.
protected StopListeningForChangeEvents ( IList list ) : void
list IList The list to stop listening to.
return void

StopSynchronizing() public method

Stop synchronizing the lists.
public StopSynchronizing ( ) : void
return void

TwoListSynchronizer() public method

Initializes a new instance of the TwoListSynchronizer class.
public TwoListSynchronizer ( IList masterList, IList targetList ) : System
masterList IList The master list.
targetList IList The target list.
return System

TwoListSynchronizer() public method

Initializes a new instance of the TwoListSynchronizer class.
public TwoListSynchronizer ( IList masterList, IList targetList, IListItemConverter masterTargetConverter ) : System
masterList IList The master list.
targetList IList The target list.
masterTargetConverter IListItemConverter The master-target converter.
return System