0
|
1 using System;
|
|
2 using System.Linq.Expressions;
|
|
3
|
|
4 namespace BLToolkit.Data.Linq.Builder
|
|
5 {
|
|
6 using BLToolkit.Linq;
|
|
7
|
|
8 class PassThroughBuilder : MethodCallBuilder
|
|
9 {
|
|
10 protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
|
|
11 {
|
|
12 return methodCall.IsQueryable("AsQueryable");
|
|
13 }
|
|
14
|
|
15 protected override IBuildContext BuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
|
|
16 {
|
|
17 return builder.BuildSequence(new BuildInfo(buildInfo, methodCall.Arguments[0]));
|
|
18 }
|
|
19
|
|
20 protected override SequenceConvertInfo Convert(
|
|
21 ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo, ParameterExpression param)
|
|
22 {
|
|
23 return null;
|
|
24 }
|
|
25 }
|
|
26 }
|