Example #1
0
        public static bool SortingSelected(IAuthorSorting currentSorting, string name)
        {
            var sorting     = AuthorSorting.AuthorSorting.GetReferenceByName(name);
            var sortingType = sorting.GetType();

            return(currentSorting.GetType().Equals(sortingType));
        }
Example #2
0
        public static string GetPropertyName(IAuthorSorting sorting)
        {
            var name = sorting.GetType().Name;

            var fields = typeof(AuthorSorting).GetFields(BindingFlags.Static | BindingFlags.Public);

            return(fields.Single(x => ("AuthorSorting" + x.Name) == name).Name);
        }
Example #3
0
 public AuthorManager()
 {
     RegisterCommands();
     _AuthorCount   = new ObservableCollection <AuthorCountViewModel>();
     _AuthorSorting = AuthorSorting.ByCountDesc;
 }