private void AddItem(object item, bool notifyPropertyChange)
{
int index = _snapShot.Count;
if (_comparer != null) {
index = _snapShot.BinarySearch(item, _comparer);
index = ~index;
}
bool currentIndexChanged = false;
if (IsCurrencyEnabled && (index <= _currentIndex)) {
currentIndexChanged = true;
}
_snapShot.Insert(index, item);
if (currentIndexChanged) {
CurrentIndex++;
}
if (notifyPropertyChange && (_propChangedHandler != null)) {
RaisePropertyChanged("Count");
if (currentIndexChanged) {
RaisePropertyChanged("CanMovePrevious");
RaisePropertyChanged("CanMoveNext");
}
}
RaiseCollectionChanged(NotifyCollectionChangedAction.Add, item, index);
}