Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
InvocationExpression1.cs
Go to the documentation of this file.
3
5
7{
8 private object _arg0;
9
10 public override int ArgumentCount => 1;
11
12 public InvocationExpression1(Expression lambda, Type returnType, Expression arg0)
13 : base(lambda, returnType)
14 {
15 _arg0 = arg0;
16 }
17
19 {
20 return ExpressionUtils.ReturnReadOnly(this, ref _arg0);
21 }
22
23 public override Expression GetArgument(int index)
24 {
25 if (index == 0)
26 {
27 return ExpressionUtils.ReturnObject<Expression>(_arg0);
28 }
29 throw new ArgumentOutOfRangeException("index");
30 }
31
32 internal override InvocationExpression Rewrite(Expression lambda, Expression[] arguments)
33 {
34 if (arguments != null)
35 {
36 return System.Linq.Expressions.Expression.Invoke(lambda, arguments[0]);
37 }
39 }
40}
static ReadOnlyCollection< ParameterExpression > ReturnReadOnly(IParameterProvider provider, ref object collection)
static InvocationExpression Invoke(Expression expression)
InvocationExpression1(Expression lambda, Type returnType, Expression arg0)
override InvocationExpression Rewrite(Expression lambda, Expression[] arguments)
override ReadOnlyCollection< Expression > GetOrMakeArguments()