ValueArgument
VariableArgument
InvocationArgument
ReferenceArgument
ClassInitializationArgument
ArrayInitializationArgument
DictionaryInitializationArgument
TypeOfArgument
ParenthesizedLambdaArgument
BinaryExpressionArgument
Statement.Expression.Invoke("Method", new List<IArgument> { new ValueArgument(1) });
Statement.Expression.Invoke("Method", new List<IArgument> { new VariableArgument("myVariable") });
Statement.Expression.Invoke("Method", new List<IArgument> { new InvocationArgument(new MethodReference("Do")) });
Statement.Expression.Invoke("Method", new List<IArgument> { new ReferenceArgument(new VariableReference("i", new MemberReference("MyProperty"))) });
ClassInitializationArgument
Statement.Expression.Invoke("Method", new List<IArgument> { new ClassInitializationArgument(typeof(List<int>))) });
ArrayInitializationArgument
Statement.Expression.Invoke("Method", new List<IArgument> { new ArrayInitializationArgument(typeof(int), new List<IArgument>() { new ValueArgument(1), new ValueArgument(2)}) });
Method(new int[] {1, 2});
DictionaryInitializationArgument
Statement.Expression.Invoke("Method", new List<IArgument> { new DictionaryInitializationArgument<int, int>(new Dictionary<int, IArgument>() { [1] = new ValueArgument(2)})});
Method(new Dictionary<int,int>{ [1] = 2});
Statement.Expression.Invoke("Method", new List<IArgument> { new TypeOfArgument(typeof(int))});
ParenthesizedLambdaArgument
Statement.Expression.Invoke("Method", new List<IArgument> { new ParenthesizedLambdaArgument(Statement.Expression.Invoke(new MethodReference("Do").AsExpression())});
BinaryExpressionArgument`
Statement.Expression.Invoke("Method", new List<IArgument> { new BinaryExpressionArgument(new MathBinaryExpression(new ConstantReference(1), new ConstantReference(2), MathOperators.Add ))});