Open sandboxFocus

Method WithObject

WithObject(IExpression?)

Gets an IMethodInvoker for the same method but with a different object, provided as an IExpression.

Declaration
IMethodInvoker WithObject(IExpression? obj)
Parameters
Type Name Description
IExpression obj

The run-time expression that represents the object for which the method should be called, or null if this is a static method.

Returns
Type Description
IMethodInvoker

WithObject(dynamic?)

Gets an IMethodInvoker for the same method but with a different object, provided as a C# expression.

Declaration
IMethodInvoker WithObject(dynamic? obj)
Parameters
Type Name Description
dynamic obj

The run-time C# expression that represents the object for which the method should be called, or null if this is a static method. If the compile-time type of the expression is dynamic, it must be explicitly cast to IExpression.

Returns
Type Description
IMethodInvoker