Esempio n. 1
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 // And
 ////////////////////////////////////////////////////////////////////////////////////////////////
 public EnumerableMember <TSource, TNextMember> And <TNextMember>(Func <TMember, TNextMember> selector) =>
 EnumerableMember.Create(_source, x => selector(_selector(x)));
Esempio 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);
Esempio n. 3
0
 public EnumerableMember <TSource, TMember> Not(Func <TMember, bool> predicate) =>
 EnumerableMember.Create(_source.Where(x => !predicate(_selector(x))), _selector);
Esempio n. 4
0
 public EnumerableMember <TSource, TMember> Not(TMember value) =>
 EnumerableMember.Create(_source.Where(x => !Equals(value, _selector(x))), _selector);
Esempio 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);
Esempio 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));
Esempio n. 7
0
 public static EnumerableMember <TSource, TChild> Member <TSource, TChild>(
     this IEnumerable <TSource> source,
     Func <TSource, TChild> selector) =>
 EnumerableMember.Create(source, selector);
Esempio n. 8
0
 public static EnumerableMember <TSource, TSource> Element <TSource>(
     this IEnumerable <TSource> source) =>
 EnumerableMember.Create(source, x => x);