Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,11 @@ public int Count
return list.Count;
}

#if FEATURE_PAGEDCOLLECTIONVIEW
PagedCollectionView collectionView = this.DataSource as PagedCollectionView;
var collectionView = this.DataSource as ICollectionView;
if (collectionView != null)
{
return collectionView.Count;
}
#endif

int count = 0;
IEnumerable enumerable = this.DataSource;
Expand Down Expand Up @@ -498,13 +496,11 @@ public object GetDataItem(int index)
return (index < list.Count) ? list[index] : null;
}

#if FEATURE_PAGEDCOLLECTIONVIEW
PagedCollectionView collectionView = this.DataSource as PagedCollectionView;
var collectionView = this.DataSource as ICollectionView;
if (collectionView != null)
{
return (index < collectionView.Count) ? collectionView.GetItemAt(index) : null;
return (index < collectionView.Count) ? collectionView[index] : null;
}
#endif

IEnumerable enumerable = this.DataSource;
if (enumerable != null)
Expand Down Expand Up @@ -579,13 +575,11 @@ public int IndexOf(object dataItem)
return list.IndexOf(dataItem);
}

#if FEATURE_PAGEDCOLLECTIONVIEW
PagedCollectionView cv = this.DataSource as PagedCollectionView;
if (cv != null)
var collectionView = this.DataSource as ICollectionView;
if (collectionView != null)
{
return cv.IndexOf(dataItem);
return collectionView.IndexOf(dataItem);
}
#endif

IEnumerable enumerable = this.DataSource;
if (enumerable != null && dataItem != null)
Expand Down