public virtual Expression CreateExpressionTree(ResolveContext ec) { if (ArgType == AType.Default) { ec.Report.Error(854, Expr.Location, "An expression tree cannot contain an invocation which uses optional parameter"); } return(Expr.CreateExpressionTree(ec)); }
public virtual Expression CreateExpressionTree(ResolveContext rc) { if (Type.Kind == MemberKind.ByRef) { rc.Report.Error(8153, Expr.Location, "An expression tree lambda cannot contain a call to a method, property, or indexer that returns by reference"); return(null); } if (ArgType == AType.Default) { rc.Report.Error(854, Expr.Location, "An expression tree cannot contain an invocation which uses optional parameter"); } return(Expr.CreateExpressionTree(rc)); }
public override Expression CreateExpressionTree(EmitContext ec) { ArrayList args; if (Arguments == null) { args = new ArrayList(1); } else { args = new ArrayList(Arguments.Count + 1); } args.Add(new Argument(InstanceExpr.CreateExpressionTree(ec))); if (Arguments != null) { foreach (Argument a in Arguments) { args.Add(new Argument(a.Expr.CreateExpressionTree(ec))); } } return(CreateExpressionFactoryCall("Invoke", args)); }
public override Expression CreateExpressionTree(ResolveContext ec) { return(newExpr.CreateExpressionTree(ec)); }
public override Expression CreateExpressionTree(ResolveContext ec) { return(condition.CreateExpressionTree(ec)); }