private static ProjectItemColumnSorter GetProjectItemSorter(SortDescription sortDescription)
        {
            SortOrder sortOrder        = sortDescription.SortOrder;
            string    sortPropertyName = sortDescription.SortPropertyName;

            if (sortOrder != SortOrder.None && !string.IsNullOrEmpty(sortPropertyName))
            {
                ListSortDirection?sortDirection = sortOrder.ToSystem();
                Debug.Assert(sortDirection != null);

                try
                {
                    return(new ProjectItemColumnSorter(sortDirection.Value, sortPropertyName));
                }
                catch (PropertyNotFoundException ex)
                {
                    ex.Trace("Trying to sort Project Items by nonexistent property.");
                    return(null);
                }
            }

            return(null);
        }
        private static ProjectItemColumnSorter GetProjectItemSorter(SortDescription sortDescription)
        {
            SortOrder sortOrder = sortDescription.SortOrder;
            string sortPropertyName = sortDescription.SortPropertyName;

            if (sortOrder != SortOrder.None && !string.IsNullOrEmpty(sortPropertyName))
            {
                ListSortDirection? sortDirection = sortOrder.ToSystem();
                Debug.Assert(sortDirection != null);

                try
                {
                    return new ProjectItemColumnSorter(sortDirection.Value, sortPropertyName);
                }
                catch (PropertyNotFoundException ex)
                {
                    ex.Trace("Trying to sort Project Items by nonexistent property.");
                    return null;
                }
            }

            return null;
        }