public void UpdateSort(IComparer<object> comparer)
{
if ((_comparer == null) && (comparer == null)) {
return;
}
object currentItem = null;
if (IsCurrencyEnabled && (_snapShot != null)) {
currentItem = CurrentItem;
}
_comparer = comparer;
_snapShot = null;
if (currentItem != null) {
EnsureSnapShot();
int index = _snapShot.IndexOf(currentItem);
CurrentIndex = index;
RaisePropertyChanged("CanMovePrevious");
RaisePropertyChanged("CanMoveNext");
}
UpdateVersion();
RaiseCollectionReset();
}