Class Trapture<T>
- Namespace
- Mokkit
- Assembly
- Mokkit.dll
TRansparent cAPTURE — a value capture that converts implicitly to the captured type, so it can be
passed wherever a T is expected without reading Mokkit.Trapture`1.Value explicitly.
Use this when the captured value flows transparently into later Arrange/Act steps; use
Mokkit.Capture`1 instead when you want to force an explicit .Value read.
public class Trapture<T> : ICapture<T>, ICaptureInitializer<T>Type Parameters
T-
The type of value to capture.
Inheritance
Implements
Inherited Members
Properties
Value
Gets the captured value.
public T? Value { get; }Property Value
- T?
Operators
implicit operator T(Trapture<T>)
Provides implicit conversion from Mokkit.Trapture`1 to the captured type.
public static implicit operator T(Trapture<T> trapture)Parameters
traptureTrapture<T>-
The trapture instance to convert.
Returns
- T
-
The captured value.
Exceptions
- InvalidOperationException
-
Thrown when the trapture has not been initialized with a value.