本文整理汇总了C#中System.Linq.Expressions.MethodCallExpression.IsQueryable方法的典型用法代码示例。如果您正苦于以下问题:C# MethodCallExpression.IsQueryable方法的具体用法?C# MethodCallExpression.IsQueryable怎么用?C# MethodCallExpression.IsQueryable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Linq.Expressions.MethodCallExpression
的用法示例。
在下文中一共展示了MethodCallExpression.IsQueryable方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanParseMethodCall
protected override bool CanParseMethodCall(ExpressionParser parser, MethodCallExpression methodCall, SqlQuery sqlQuery)
{
return
methodCall.IsQueryable("SelectMany") &&
methodCall.Arguments.Count == 3 &&
((LambdaExpression)methodCall.Arguments[1].Unwrap()).Parameters.Count == 1;
}
示例2: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
if (!methodCall.IsQueryable("OrderBy", "OrderByDescending", "ThenBy", "ThenByDescending"))
return false;
var body = ((LambdaExpression)methodCall.Arguments[1].Unwrap()).Body.Unwrap();
if (body.NodeType == ExpressionType.MemberInit)
{
var mi = (MemberInitExpression)body;
bool throwExpr;
if (mi.NewExpression.Arguments.Count > 0 || mi.Bindings.Count == 0)
throwExpr = true;
else
throwExpr = mi.Bindings.Any(b => b.BindingType != MemberBindingType.Assignment);
if (throwExpr)
throw new NotSupportedException("Explicit construction of entity type '{0}' in order by is not allowed.".Args(body.Type));
}
return true;
}
示例3: CanParseMethodCall
protected override bool CanParseMethodCall(ExpressionParser parser, MethodCallExpression methodCall, SqlQuery sqlQuery)
{
if (!methodCall.IsQueryable("Join", "GroupJoin") || methodCall.Arguments.Count != 5)
return false;
var body = ((LambdaExpression)methodCall.Arguments[2].Unwrap()).Body.Unwrap();
if (body.NodeType == ExpressionType .MemberInit)
{
var mi = (MemberInitExpression)body;
bool throwExpr;
if (mi.NewExpression.Arguments.Count > 0 || mi.Bindings.Count == 0)
throwExpr = true;
else
throwExpr = mi.Bindings.Any(b => b.BindingType != MemberBindingType.Assignment);
if (throwExpr)
throw new NotSupportedException(string.Format("Explicit construction of entity type '{0}' in join is not allowed.", body.Type));
}
return true;
}
示例4: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.IsQueryable("LoadWith");
}
示例5: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.IsQueryable("DefaultIfEmpty");
}
示例6: CanParseMethodCall
protected override bool CanParseMethodCall(ExpressionParser parser, MethodCallExpression methodCall, SqlQuery sqlQuery)
{
return methodCall.IsQueryable("Skip", "Take");
}
示例7: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.IsQueryable("Where", "Having");
}
示例8: CanParseMethodCall
protected override bool CanParseMethodCall(ExpressionParser parser, MethodCallExpression methodCall, SqlQuery sqlQuery)
{
return methodCall.IsQueryable("DefaultIfEmpty");
}
示例9: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.IsQueryable("Concat", "Union") && methodCall.Arguments.Count == 2;
}
示例10: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.Arguments.Count == 2 && methodCall.IsQueryable("Except", "Intersect");
}
示例11: CanBuildMethodCall
protected override bool CanBuildMethodCall(ExpressionBuilder builder, MethodCallExpression methodCall, BuildInfo buildInfo)
{
return methodCall.IsQueryable("TableName", "DatabaseName", "SchemaName", "OwnerName");
}