Menu

#225 Improvement to EnumEx

open-accepted
Maettu
Utilities (13)
3
2020-01-10
2015-02-21
Maettu
No

Discussion

  • Maettu

    Maettu - 2015-12-05
    • Priority: 5 --> 3
     
  • Maettu

    Maettu - 2017-10-06

    In addition, consider implementing lookups as dictionary. After all EnumEx typically isn't that performance critical, but dictionaries would significantly simplify the code.

     
  • Maettu

    Maettu - 2017-11-25

    Consider simplifying public static EnumEx[] GetItems(), e.g. by calling one of GetUnderlying...() of the base class.

    Even further, EnumEx could be extended by <T> , allowing to further simplify the implementation. This would also allow to merge RecentIPHostCollection and RecentIPFilterCollection into a generic RecentEnumCollection.

    Also consider to replace return type to IEnumerable<EnumEx> (see IPFilterEx, IPHostEx).

     

    Last edit: Maettu 2017-11-25
  • Maettu

    Maettu - 2020-01-10

    Consider implementing ToString() and Parse() using a dictionary. Only handle exceptions explicitly.

     

Log in to post a comment.