Exemplo n.º 1
0
 static public IEnumerable <T> GetAncestors <T>(this Relatable item, int depth)
 {
     return(item.GetSelfAndParents <T>().Offset(depth));
 }
Exemplo n.º 2
0
 static public T GetAncestor <T>(this Relatable item, int depth)
 {
     return(item.GetSelfAndParents <T>().Get(depth));
 }
Exemplo n.º 3
0
 static public T GetSelfOrParent <T>(this Relatable item)
 {
     return(item.GetSelfAndParents <T>().GetFirst());
 }
Exemplo n.º 4
0
 static public T GetSelfOrParent <T>(this Relatable item, Predicate <T> predicate)
 {
     return(item.GetSelfAndParents <T>().FindFirst(predicate));
 }
Exemplo n.º 5
0
 static public IEnumerable <T> GetSelfAndParents <T>(this Relatable item)
 {
     return(item.GetSelfAndParents().Convert <object, T>());
 }