2011-04-28 132 views
2

以下是System.Linq.EnumerableExecutor的文档。EnumerableExecutor类的用途和用途是什么?

我不知道它可能做什么或用于什么。下面是我从反射器得到的源代码:

public abstract class EnumerableExecutor 
{ 
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] 
    protected EnumerableExecutor(){} 
} 

public class EnumerableExecutor<T> : EnumerableExecutor 
{ 
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] 
    public EnumerableExecutor(Expression expression){} 
} 

任何接受者?

+1

”_此API支持.NET Framework基础结构,不能直接在您的代码中使用。“ – driis 2011-04-28 10:29:18

+0

不确定任何人能够提供多于”代表表达式树并提供执行功能重写它之后的表达树“,说实话,但你永远不知道。 – AakashM 2011-04-28 10:36:45

回答

2

正如它在文档中所述,它不打算被我们的代码使用。它具有内部方法可能是框架的内部有用,如:

internal T Execute(); 

internal override object ExecuteBoxed(); 

看来这样做的目的是提供的功能来编译Expression,执行它并返回结果。 “