And<T>(T, Action<T>) Method
Performs the specified action on the given object and then returns the object.
Useful for fluent testing patterns where additional assertions or operations
are chained together in a readable manner.
[DebuggerStepThrough]
public static T And<T>(this T item, Action<T> action)
- Namespace
- Spectre
.Console .Testing - Containing Type
- ShouldlyExtensions
Attributes
-
Debugger
Step Through Attribute
Parameters
-
T
- The type of the object.
Parameters
- T item
- The object to operate on.
-
Action
<T> action - An action to perform on the object.
Returns
- T