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
-
Match<T>CaptureMatch<T>
- Implements
-
IEquatable<Match<T>>
- Inherited Members
Constructors
CaptureMatch(Action<T>)
Initializes an instance of the capture match.
public CaptureMatch(Action<T> captureCallback)
Parameters
captureCallbackAction<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
captureCallbackAction<T>An action to run on captured value
predicateExpression<Func<T, bool>>A predicate used to filter captured parameters