Table of Contents

Struct InvocationAction

Namespace
Moq
Assembly
Moq.dll

A delegate-like type for use with setup.Callback which instructs the Callback verb to provide the callback with the current IInvocation, instead of with a list of arguments.

This type is useful in scenarios involving generic type argument matchers (such as It.IsAnyType) as IInvocation allows the discovery of both arguments and type arguments.

public readonly struct InvocationAction
Inherited Members

Constructors

InvocationAction(Action<IInvocation>)

Initializes a new instance of the InvocationAction type.

public InvocationAction(Action<IInvocation> action)

Parameters

action Action<IInvocation>

The delegate that should be wrapped by this instance.