Exemplo n.º 1
0
        public ThenBy()
        {
            Func <IOrderedQueryable <TSource>, Expression <Func <TSource, TKey> >, IOrderedQueryable <TSource> > f  = Queryable.ThenBy;
            Func <IOrderedEnumerable <TSource>, Func <TSource, TKey>, IOrderedEnumerable <TSource> >             f2 = Enumerable.ThenBy;

            var translator = new SimpleMethodWithLambdaTranslator();

            AddTranslator(f.Method, translator);
            AddTranslator(f2.Method, translator);
        }
Exemplo n.º 2
0
        public Where()
        {
            Func <IQueryable <TSource>, Expression <Func <TSource, bool> >, IQueryable <TSource> > f  = Queryable.Where;
            Func <IEnumerable <TSource>, Func <TSource, bool>, IEnumerable <TSource> >             f2 = Enumerable.Where;

            var translator = new SimpleMethodWithLambdaTranslator();

            AddTranslator(f.Method, translator);
            AddTranslator(f2.Method, translator);
        }
Exemplo n.º 3
0
        public Take()
        {
            Func <IQueryable <TSource>, int, IQueryable <TSource> >   f  = Queryable.Take;
            Func <IEnumerable <TSource>, int, IEnumerable <TSource> > f2 = Enumerable.Take;

            var translator = new TakeTranslator();

            AddTranslator(f.Method, translator);
            AddTranslator(f2.Method, translator);

            Func <IQueryable <TSource>, Expression <Func <TSource, bool> >, IQueryable <TSource> > f3 = Queryable.TakeWhile;
            Func <IEnumerable <TSource>, Func <TSource, bool>, IEnumerable <TSource> >             f4 = Enumerable.TakeWhile;

            var translatorWithLambda = new SimpleMethodWithLambdaTranslator();

            AddTranslator(f3.Method, translatorWithLambda);
            AddTranslator(f4.Method, translatorWithLambda);
        }