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