Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renaming internalInsert, removing unused method

  • Loading branch information...
commit e32d41125c97e93c4cc82bebdd394fe00561e817 1 parent e577bab
@niik niik authored paulcbetts committed
Showing with 5 additions and 10 deletions.
  1. +5 −10 ReactiveUI/ReactiveCollectionMixins.cs
View
15 ReactiveUI/ReactiveCollectionMixins.cs
@@ -108,7 +108,7 @@ private void onItemChanged(TSource changedItem)
if (isIncluded && !shouldBeIncluded) {
internalRemoveAt(destinationIndex);
} else if (!isIncluded && shouldBeIncluded) {
- internalInsert(sourceIndex, selector(changedItem));
+ internalInsertAndMap(sourceIndex, selector(changedItem));
}
else if (isIncluded && shouldBeIncluded) {
// The item is already included and it should stay there but it's possible that the change that
@@ -137,7 +137,7 @@ private void onItemChanged(TSource changedItem)
} else {
// The change is forcing us to reorder, implemented as a remove and insert.
internalRemoveAt(destinationIndex);
- internalInsert(sourceIndex, newItem);
+ internalInsertAndMap(sourceIndex, newItem);
}
}
}
@@ -225,7 +225,7 @@ private void onSourceCollectionChanged(NotifyCollectionChangedEventArgs args)
}
var destinationItem = selector(sourceItem);
- internalInsert(args.NewStartingIndex + i, destinationItem);
+ internalInsertAndMap(args.NewStartingIndex + i, destinationItem);
}
}
}
@@ -256,7 +256,7 @@ public override void Reset()
foreach (TSource sourceItem in source) {
if (filter(sourceItem)) {
var destinationItem = selector(sourceItem);
- internalInsert(sourceIndex, destinationItem);
+ internalInsertAndMap(sourceIndex, destinationItem);
}
sourceIndex++;
@@ -270,15 +270,10 @@ private void internalClear()
base.Clear();
}
- private void internalInsert(int sourceIndex, TValue value)
+ private void internalInsertAndMap(int sourceIndex, TValue value)
{
int destinationIndex = positionForNewItem(sourceIndex, value);
- internalInsert(sourceIndex, destinationIndex, value);
- }
-
- private void internalInsert(int sourceIndex, int destinationIndex, TValue value)
- {
indexToSourceIndexMap.Insert(destinationIndex, sourceIndex);
base.Insert(destinationIndex, value);
}
Please sign in to comment.
Something went wrong with that request. Please try again.