Example #1
0
 public static T GetByIdOrDefault <T>([NotNull] this HierarchicalGroup source, string id) where T : IWithId
 {
     return(source.OfType <T>().GetByIdOrDefault(id));
 }
Example #2
0
 public static IEnumerable <T> HierarchicalWhere <T>([NotNull] this HierarchicalGroup source, Func <T, bool> filter)
 {
     return(source.OfType <T>().Where(filter));
 }
Example #3
0
 public static T FirstOrDefault <T>([NotNull] this HierarchicalGroup source)
 {
     return(source.OfType <T>().FirstOrDefault());
 }