Open sandboxFocus

Method RedirectToExistingMethod

RedirectToExistingMethod(IMethod)

Redirects the calls to an existing method.

Declaration
IExistingMethodRegistration RedirectToExistingMethod(IMethod method)
Parameters
Type Name Description
IMethod method

The existing method.

Returns
Type Description
IExistingMethodRegistration
Remarks

See RedirectToExistingMethod(IMethod), which describes how the parameters and type parameters of the method are bound. The arguments are given by WithArgs(object).

Exceptions
Type Condition
ArgumentNullException

method is null.

ArgumentException

The method is a constructed generic method.