protected internal void clearItems() { void perform() { PreCollectionChanged?.Invoke(this, null); base.ClearItems(); PostCollectionChanged?.Invoke(this, null); } ChangeMarkerField = !ChangeMarkerField; _currentChange = NotifyCollectionChangedAction.Reset; if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); perform(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { perform(); } _currentChange = null; }
protected internal void insertItem(int index, TItem item) { void perform() { PreCollectionChanged?.Invoke(this, null); base.InsertItem(index, item); PostCollectionChanged?.Invoke(this, null); } ChangeMarkerField = !ChangeMarkerField; _currentChange = NotifyCollectionChangedAction.Add; _newIndex = index; _newItem = item; if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); perform(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { perform(); } _currentChange = null; _newIndex = -1; _newItem = default(TItem); }
protected internal void setItem(int index, TItem item) { void perform() { PreCollectionChanged?.Invoke(this, null); base.SetItem(index, item); PostCollectionChanged?.Invoke(this, null); } TickTackVersion = !TickTackVersion; _currentChange = NotifyCollectionChangedAction.Replace; _newItem = item; _newIndex = index; _oldIndex = index; if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); perform(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { perform(); } _currentChange = null; _newItem = default; _newIndex = -1; _oldIndex = -1; }
protected internal void moveItem(int oldIndex, int newIndex) { void perform() { PreCollectionChanged?.Invoke(this, null); base.MoveItem(oldIndex, newIndex); PostCollectionChanged?.Invoke(this, null); } ChangeMarkerField = !ChangeMarkerField; _currentChange = NotifyCollectionChangedAction.Move; _oldIndex = oldIndex; _newIndex = newIndex; if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); perform(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { perform(); } _currentChange = null; _oldIndex = -1; _newIndex = -1; }
private TReturnValue processNewItem(TSourceItem sourceItem) { if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); TReturnValue returnValue = _newItemProcessor(sourceItem, this); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); return(returnValue); } return(_newItemProcessor(sourceItem, this)); }
private void processMovedItem(TSourceItem sourceItem) { if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); _moveItemProcessor(sourceItem, this); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return; } _moveItemProcessor(sourceItem, this); }
private void processOldItem(TSourceItem sourceItem) { if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); _oldItemProcessor(sourceItem, this); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); return; } _oldItemProcessor(sourceItem, this); }
private TReturnValue[] processNewItems(TSourceItem[] sourceItems) { if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); TReturnValue[] returnValues = _newItemsProcessor(sourceItems, this); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(returnValues); } return(_newItemsProcessor(sourceItems, this)); }
private void processNewItems(TSourceItem[] sourceItems) { if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); _newItemsProcessor(sourceItems, this); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return; } _newItemsProcessor(sourceItems, this); }
private TResult deaggregate(TSourceItem removedSourceItem, TResult value) { if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); TResult result = _deaggregateFunc(removedSourceItem, value); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(result); } return(_deaggregateFunc(removedSourceItem, value)); }
private void processNewValue(TValue newValue) { if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); _newValueProcessor(newValue, this); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); } else { _newValueProcessor(newValue, this); } }
private TReturnValue processNewValue(TValue newValue) { if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); TReturnValue returnValue = _newValueProcessor(newValue, this); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(returnValue); } else { return(_newValueProcessor(newValue, this)); } }
public TOrderingValue GetOrderingValueBySourceIndex(int sourceIndex) { TOrderingValue getValue() => !_orderingValueSelectorContainsParametrizedLiveLinqCalls ? _orderingValueSelectorFunc(_sourceAsList[sourceIndex]) : _itemInfos[sourceIndex].GetOrderingValueFunc(); if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); TOrderingValue result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(result); } return(getValue()); }
// ReSharper disable once MemberCanBePrivate.Global public bool ApplyPredicate(int sourceIndex) { bool getValue() => _predicateContainsParametrizedObservableComputationCalls ? _itemInfos[sourceIndex].PredicateFunc() : _predicateFunc(_sourceAsList[sourceIndex]); if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); bool result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); return(result); } return(getValue()); }
private TOrderingValue getOrderingValue(OrderingItemInfo<TOrderingValue> itemInfo, TSourceItem sourceItem) { TOrderingValue getValue() => !_orderingValueSelectorContainsParametrizedLiveLinqCalls ? _orderingValueSelectorFunc(sourceItem) : itemInfo.GetOrderingValueFunc(); if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); TOrderingValue result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); return result; } return getValue(); }
private TResultItem applySelector(ItemInfo itemInfo, TSourceItem sourceItem) { TResultItem getValue() => _selectorContainsParametrizedObservableComputationsCalls ? itemInfo.SelectorFunc() : _selectorFunc(sourceItem); if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); TResultItem result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(result); } return(getValue()); }
private TResult getResult() { TResult result; if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); result = _getValueFunc(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { result = _getValueFunc(); } return(result); }
private TResult getValue() { TResult value; if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); value = _getter(_source); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { value = _getter(_source); } return(value); }
private TResult getValue() { TResult value; if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); value = _getter(_propertyHolder); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); } else { value = _getter(_propertyHolder); } return(value); }
bool IFiltering <TSourceItem> .applyPredicate(TSourceItem sourceItem, Func <bool> itemPredicateFunc) { bool getValue() => _predicateContainsParametrizedObservableComputationsCalls ? itemPredicateFunc() : _predicateFunc(sourceItem); if (Configuration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); bool result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); return(result); } return(getValue()); }
public TOrderingValue GetOrderingValueByOrderedIndex(int orderedIndex) { TOrderingValue getValue() => !_orderingValueSelectorContainsParametrizedLiveLinqCalls ? _orderingValueSelectorFunc(this[orderedIndex]) : _orderedItemInfos[orderedIndex].ItemInfo.GetOrderingValueFunc(); if (Configuration.TrackComputingsExecutingUserCode) { var currentThread = Utils.startComputingExecutingUserCode(out var computing, out _userCodeIsCalledFrom, this); TOrderingValue result = getValue(); Utils.endComputingExecutingUserCode(computing, currentThread, out _userCodeIsCalledFrom); return result; } return getValue(); }
private void processOldValue(TValue oldValue) { if (_oldValueProcessor == null) { return; } if (OcConfiguration.TrackComputingsExecutingUserCode) { int currentThreadId = Utils.startComputingExecutingUserCode(out IComputing computing, out _userCodeIsCalledFrom, this); _oldValueProcessor(oldValue, this, _value); Utils.endComputingExecutingUserCode(computing, currentThreadId, out _userCodeIsCalledFrom); } else { _oldValueProcessor(oldValue, this, _value); } }