/// <summary>
 /// Filters universe
 /// </summary>
 /// <param name="universe"></param>
 /// <param name="predicate"></param>
 /// <returns></returns>
 public static FutureFilterUniverse Where(this FutureFilterUniverse universe, Func <Symbol, bool> predicate)
 {
     universe._allSymbols = universe._allSymbols.Where(predicate).ToList();
     universe._isDynamic  = true;
     return(universe);
 }
 /// <summary>
 /// Binds universe
 /// </summary>
 public static FutureFilterUniverse SelectMany(this FutureFilterUniverse universe, Func <Symbol, IEnumerable <Symbol> > mapFunc)
 {
     universe._allSymbols = universe._allSymbols.SelectMany(mapFunc).ToList();
     universe._isDynamic  = true;
     return(universe);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Maps universe
 /// </summary>
 /// <param name="universe">Universe to apply the filter too</param>
 /// <param name="mapFunc">Symbol function to determine which Symbols are filtered</param>
 /// <returns><see cref="FutureFilterUniverse"/> with filter applied</returns>
 public static FutureFilterUniverse Select(this FutureFilterUniverse universe, Func <Symbol, Symbol> mapFunc)
 {
     universe.AllSymbols        = universe.AllSymbols.Select(mapFunc).ToList();
     universe.IsDynamicInternal = true;
     return(universe);
 }