Esempio n. 1
0
 /// <summary>
 /// Gets the descendants of the <see cref="IProductCollection"/> including itself.
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="predicate">
 /// The predicate.
 /// </param>
 /// <returns>
 /// The <see cref="IEnumerable{IProductCollection}"/>.
 /// </returns>
 public static IEnumerable <IProductCollection> DescendantsOrSelf(this IProductCollection value, Expression <Func <IProductCollection, bool> > predicate = null)
 {
     return(value.AsTreeNode().DescendantsOrSelf().Values(predicate));
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the siblings of the <see cref="IProductCollection"/>.
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="predicate">
 /// An optional lambda expression
 /// </param>
 /// <returns>
 /// The <see cref="IEnumerable{IProductCollection}"/>.
 /// </returns>
 public static IEnumerable <IProductCollection> Ancestors(this IProductCollection value, Expression <Func <IProductCollection, bool> > predicate = null)
 {
     return(value.AsTreeNode().Ancestors().Values(predicate));
 }
Esempio n. 3
0
 /// <summary>
 /// Gets the first descendant matching the expression
 /// </summary>
 /// <param name="value">
 /// The value.
 /// </param>
 /// <param name="predicate">
 /// The predicate.
 /// </param>
 /// <returns>
 /// The <see cref="IProductCollection"/>.
 /// </returns>
 public static IProductCollection Descendant(this IProductCollection value, Expression <Func <IProductCollection, bool> > predicate)
 {
     return(value.AsTreeNode().Descendants().Values(predicate).FirstOrDefault());
 }