Table of Contents

Class CaptureMatch<T>

Namespace
Moq
Assembly
Moq.dll

Allows creation custom matchers that can be used on setups to capture parameter values.

public class CaptureMatch<T> : Match<T>, IEquatable<Match<T>>

Type Parameters

T
Inheritance
CaptureMatch<T>
Implements
Inherited Members

Constructors

CaptureMatch(Action<T>)

Initializes an instance of the capture match.

public CaptureMatch(Action<T> captureCallback)

Parameters

captureCallback Action<T>

An action to run on captured value

CaptureMatch(Action<T>, Expression<Func<T, bool>>)

Initializes an instance of the capture match.

public CaptureMatch(Action<T> captureCallback, Expression<Func<T, bool>> predicate)

Parameters

captureCallback Action<T>

An action to run on captured value

predicate Expression<Func<T, bool>>

A predicate used to filter captured parameters