//private void changeSortMethod(SortCriteria sortBy, ListSortDirection sortDirection)
        //{
        //    ListCollectionView dataView = (ListCollectionView)(CollectionViewSource.GetDefaultView(_subEntries));

        //    dataView.SortDescriptions.Clear();
        //    dataView.CustomSort = null;

        //    SortDirectionType direction = sortDirection == ListSortDirection.Ascending ?
        //       SortDirectionType.sortAssending : SortDirectionType.sortDescending;

        //    dataView.CustomSort = new EntryComparer<FI, DI, FSI>(sortBy, direction)
        //    { IsFolderFirst = true };

        //}

        private void setupSubEntries()
        {
            //Func<EntryModel<FI, DI, FSI>, EntryViewModel<FI, DI, FSI>> toViewModel =
            //    (m) =>
            //    {
            //        EntryViewModel<FI, DI, FSI> retVal = m.ToViewModel();
            //        retVal.ParentViewModel = this;
            //        return retVal;
            //    };
            _subEntries = new AsyncObservableCollection <EntryViewModel <FI, DI, FSI> >
                          (
                from entryModel in EmbeddedDirectoryModel.GetSubEntries(true)
                select entryModel.ToViewModel(Profile),
                (list, ex) =>
            {
                ListStatus = (ex != null) ? ListMode.Error : ListMode.Completed;
                _subDirectories.Clear();
                _subFiles.Clear();
                foreach (EntryViewModel <FI, DI, FSI> entry in _subEntries)
                {
                    if (entry is FileViewModel <FI, DI, FSI> )
                    {
                        _subFiles.Add(entry);
                    }
                }

                foreach (EntryViewModel <FI, DI, FSI> entry in _subEntries)
                {
                    if (entry is DirectoryViewModel <FI, DI, FSI> )
                    {
                        _subDirectories.Add(entry);
                    }
                }

                lock (taskCompletedNotifierList)
                {
                    foreach (Action taskAfterCompleted in taskCompletedNotifierList)
                    {
                        taskAfterCompleted();
                    }
                    taskCompletedNotifierList.Clear();
                }

                HasSubDirectories = _subDirectories.Count > 0;
            });
            _subDirectories = new ObservableCollection <EntryViewModel <FI, DI, FSI> >();
            _subFiles       = new ObservableCollection <EntryViewModel <FI, DI, FSI> >();

            _subEntries.ChangeSortMethod(_sortBy, _sortDirection);
        }