Exemple #1
0
 /// <summary>
 ///     The first element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut Last <TOut, TProducer>(
     this SpanEnumerable <TOut, TProducer> spanEnum,
     Predicate <TOut> predicate)
     where TProducer : struct, IProducer <TOut>
 =>
 spanEnum.Where(predicate).Last();
Exemple #2
0
 /// <summary>
 ///     The first element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut FirstOrDefault <TOut, TProducer>(
     this SpanEnumerable <TOut, TProducer> spanEnum,
     Predicate <TOut> predicate)
     where TProducer : struct, IProducer <TOut>
 =>
 spanEnum.Where(predicate).FirstOrDefault();
Exemple #3
0
 /// <summary>
 ///     The last element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut LastOrDefault <TOut>(
     this SpanEnumerable <TOut> spanEnum,
     Predicate <TOut> predicate)
 =>
 spanEnum.Where(predicate).LastOrDefault();
Exemple #4
0
 /// <summary>
 ///     The single element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut Single <TIn, TOut, TProducer>(
     this SpanEnumerable <TIn, TOut, TProducer> spanEnum,
     Predicate <TOut> predicate)
     where TProducer : struct, IProducer <TIn, TOut>
 =>
 spanEnum.Where(predicate).Single();
Exemple #5
0
 /// <summary>
 ///     The first element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut First <TOut>(
     this SpanEnumerable <TOut> spanEnum,
     Predicate <TOut> predicate)
 =>
 spanEnum.Where(predicate).First();
Exemple #6
0
 /// <summary>
 ///     The single element of a sequence that satisfies a predicate.
 /// </summary>
 public static TOut Single <TOut>(
     this SpanEnumerable <TOut> spanEnum,
     Predicate <TOut> predicate)
 =>
 spanEnum.Where(predicate).Single();