예제 #1
0
        internal override Pair <MethodInfo, Expression[]> GetOperator()
        {
            Type       sourceType = this.m_keySelector.Parameters[0].Type;
            MethodInfo operation  = TypeSystem.FindStaticMethod(
                typeof(Microsoft.Research.DryadLinq.HpcLinqQueryable), "HashPartition",
                new Type[] { typeof(IQueryable <>).MakeGenericType(sourceType),
                             m_keySelector.GetType(),
                             m_comparer.GetType(),
                             typeof(int) },
                new Type[] { sourceType, typeof(TKey) });

            Expression[] arguments = new Expression[] {
                m_keySelector,
                Expression.Constant(this.m_comparer, typeof(IEqualityComparer <TKey>)),
                Expression.Constant(this.Count)
            };

            return(new Pair <MethodInfo, Expression[]>(operation, arguments));
        }