private void handleSourceScalarPropertyChanged(object sender, PropertyChangedEventArgs e) { Utils.processChange( sender, e, _changeHolderAction, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, _deferredQueuesCount, ref _deferredProcessings, this); }
private void handleEqualityComparerScalarValueChanged(object sender, PropertyChangedEventArgs e) { Utils.processChange( sender, e, _setEqualityComparerAction, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, _deferredQueuesCount, ref _deferredProcessings, this); }
private void handlePropertyHolderPropertyChanged(object sender, PropertyChangedEventArgs e) { Utils.processChange( sender, e, _changeValueAction, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, 1, ref _deferredProcessings, this); }
private void handleIndexScalarValueChanged(object sender, PropertyChangedEventArgs e) { Utils.processChange( sender, e, _changeIndexAction, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, 2, ref _deferredProcessings, this); }
private void getValueExpressionWatcherOnValueChanged(ExpressionWatcher expressionWatcher, object sender, EventArgs eventArgs) { Utils.processChange( sender, eventArgs, _changeValueAction, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, 1, ref _deferredProcessings, this, false); }
private void handleSourceScalarPropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName != nameof(Value)) { return; } Utils.processChange( sender, e, updateValue, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, _deferredQueuesCount, ref _deferredProcessings, this); }
private void registerSourceItem(object sourceItemObject, ItemInfo itemInfo) { itemInfo.Concatenating = this; IReadScalar <object> sourceScalar = sourceItemObject as IReadScalar <object>; itemInfo.SourceScalar = sourceScalar; INotifyCollectionChanged source = sourceScalar != null ? (INotifyCollectionChanged)sourceScalar.Value : (INotifyCollectionChanged)sourceItemObject; registerSourceItem(itemInfo, source); if (sourceScalar != null) { itemInfo.SourceScalarPropertyChangedEventHandler = (sender, eventArgs) => { Utils.processChange(sender, eventArgs, () => { if (ReferenceEquals(itemInfo.SourceScalar, sourceScalar)) { object sourceScalarValue = sourceScalar.Value; unregisterSourceItem(itemInfo); registerSourceItem(itemInfo, (INotifyCollectionChanged)sourceScalarValue); replaceItem(itemInfo.SourceCopy, itemInfo); } }, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 1, _deferredQueuesCount, ref _deferredProcessings, this); }; sourceScalar.PropertyChanged += itemInfo.SourceScalarPropertyChangedEventHandler; } }
private void handleCountChanged(object sender, PropertyChangedEventArgs e) { int newCount = _countScalar.Value; void action() { if (_count < newCount) { for (int item = _count; item < newCount; item++) { baseInsertItem(item, item); } _count = newCount; } else if (_count > newCount) { for (int itemIndex = _count - 1; itemIndex > newCount - 1; itemIndex--) { baseRemoveItem(itemIndex); } _count = newCount; } } Utils.processChange( sender, e, action, ref _isConsistent, ref _handledEventSender, ref _handledEventArgs, 0, _deferredQueuesCount, ref _deferredProcessings, this); }