private void registerSourceItem(ItemInfo itemInfo, INotifyCollectionChanged source) { itemInfo.Source = source; if (source != null) { itemInfo.SourceAsINotifyPropertyChanged = (INotifyPropertyChanged)source; itemInfo.SourcePropertyChangedEventHandler = (sender, args) => Utils.handleSourcePropertyChanged(args, ref itemInfo.CountPropertyChangedEventRaised, ref itemInfo.IndexerPropertyChangedEventRaised); itemInfo.SourceAsINotifyPropertyChanged.PropertyChanged += itemInfo.SourcePropertyChangedEventHandler; itemInfo.SourceNotifyCollectionChangedEventHandler = (sender, eventArgs) => handleSourceCollectionChanged(sender, eventArgs, itemInfo); source.CollectionChanged += itemInfo.SourceNotifyCollectionChangedEventHandler; IHasTickTackVersion sourceAsIHasTickTackVersion = source as IHasTickTackVersion; itemInfo.SourceAsIHasTickTackVersion = sourceAsIHasTickTackVersion; if (sourceAsIHasTickTackVersion != null) { itemInfo.LastProcessedSourceTickTackVersion = sourceAsIHasTickTackVersion.TickTackVersion; } } initializeSourceCopy(itemInfo); }
void ISourceIndexerPropertyTracker.HandleSourcePropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) { Utils.handleSourcePropertyChanged(propertyChangedEventArgs, ref _countPropertyChangedEventRaised, ref _indexerPropertyChangedEventRaised); }
private void handleSourcePropertyChanged(object sender, PropertyChangedEventArgs args) { Utils.handleSourcePropertyChanged(args, ref _countPropertyChangedEventRaised, ref _indexerPropertyChangedEventRaised); }