Open sandboxFocus

Method Invoke

Invoke(params dynamic?[])

Generates run-time code that invokes the current method with a given list of arguments.

Declaration
dynamic? Invoke(params dynamic?[] args)
Parameters
Type Name Description
dynamic[] args

A list of C# expressions to be passed to the method. If the compile-time type of any expression is dynamic, it must be explicitly cast to IExpression.

Returns
Type Description
dynamic

A dynamic object representing the return value of the method, if any.

Remarks

By default, the method is invoked on the current object (this), unless the method is static. The base implementation of the method is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the WithOptions(InvokerOptions) method.

Invoke(IEnumerable<IExpression>)

Generates run-time code that invokes the current method with a given list of argument expressions.

Declaration
dynamic? Invoke(IEnumerable<IExpression> args)
Parameters
Type Name Description
IEnumerable<IExpression> args

A list of C# expressions to be passed to the method.

Returns
Type Description
dynamic

A dynamic object representing the return value of the method, if any.

Remarks

By default, the method is invoked on the current object (this), unless the method is static. The base implementation of the method is invoked, i.e. the implementation before the current aspect layer. To change the default values, or to use the ?. null-conditional operator, use the WithOptions(InvokerOptions) method.