Ejemplo n.º 1
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 // And
 ////////////////////////////////////////////////////////////////////////////////////////////////
 public EnumerableMember <TSource, TNextMember> And <TNextMember>(Func <TMember, TNextMember> selector) =>
 EnumerableMember.Create(_source, x => selector(_selector(x)));
Ejemplo n.º 2
0
 public EnumerableMember <TSource, TMember> Not <TMemberValue>(TMemberValue value)
     where TMemberValue : IEquatable <TMemberValue>, TMember =>
 EnumerableMember.Create(_source.Where(x => !Equals(value, _selector(x))), _selector);
Ejemplo n.º 3
0
 public EnumerableMember <TSource, TMember> Not(Func <TMember, bool> predicate) =>
 EnumerableMember.Create(_source.Where(x => !predicate(_selector(x))), _selector);
Ejemplo n.º 4
0
 public EnumerableMember <TSource, TMember> Not(TMember value) =>
 EnumerableMember.Create(_source.Where(x => !Equals(value, _selector(x))), _selector);
Ejemplo n.º 5
0
        //public EnumerableMember<TSource, TMember> Is<TMemberValue>(Func<TMemberValue, bool> predicate)
        //    where TMemberValue : IEquatable<TMemberValue>, TMember =>
        //        EnumerableMember.Create(_source.Where(x => predicate(_selector(x))), _selector);

        ////////////////////////////////////////////////////////////////////////////////////////////////
        // Not
        ////////////////////////////////////////////////////////////////////////////////////////////////
        public EnumerableMember <TSource, TMember> Not <TMemberType>()
            where TMemberType : TMember =>
        EnumerableMember.Create(_source.Where(x => !(_selector(x) is TMemberType)), _selector);
Ejemplo n.º 6
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 // Is
 ////////////////////////////////////////////////////////////////////////////////////////////////
 public EnumerableMember <TSource, TMemberType> Is <TMemberType>()
     where TMemberType : TMember =>
 EnumerableMember.Create(
     _source.Where(x => _selector(x) is TMemberType),
     x => (TMemberType)_selector(x));
Ejemplo n.º 7
0
 public static EnumerableMember <TSource, TChild> Member <TSource, TChild>(
     this IEnumerable <TSource> source,
     Func <TSource, TChild> selector) =>
 EnumerableMember.Create(source, selector);
Ejemplo n.º 8
0
 public static EnumerableMember <TSource, TSource> Element <TSource>(
     this IEnumerable <TSource> source) =>
 EnumerableMember.Create(source, x => x);