src/Shared/EntityFramework/Internal/SortableBindingList`.cs
// <summary>
// Applies sorting to the list.
// </summary>
// <param name="prop"> The property to sort by. </param>
// <param name="direction"> The sort direction. </param>
Applies sorting to the list.
Applies sorting to the list .
protected override void ApplySortCore(PropertyDescriptor prop, ListSortDirection direction)
        {
            if (PropertyComparer.CanSort(prop.PropertyType))
            {
                ((List<T>)Items).Sort(new PropertyComparer(prop, direction));
                _sortDirection = direction;
                _sortProperty = prop;
                _isSorted = true;
                OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
            }
        }
protected override void ApplySortCore ( PropertyDescriptor prop , ListSortDirection direction ) { if ( PropertyComparer . CanSort ( prop . PropertyType ) ) { ( ( List < T > ) Items ) . Sort ( new PropertyComparer ( prop , direction ) ) ; _sortDirection = direction ; _sortProperty = prop ; _isSorted = true ; OnListChanged ( new ListChangedEventArgs ( ListChangedType . Reset , - 1 ) ) ; } }
Applies sorting to the list.
Applies sorting to the list .
prop
PropertyDescriptor
The property to sort by.
The property to sort by .
direction
ListSortDirection
The sort direction.
The sort direction .