Click or drag to resize

ObjectExtensionsInterceptT Method

Intercepts the specified value. Can be used to e.g. log LINQ expressions.


Namespace:  TomsToolbox.Essentials
Assembly:  TomsToolbox.Essentials (in TomsToolbox.Essentials.dll)
public static T Intercept<T>(
	this T value,
	Action<T> interceptor


Type: T
The value.


Type: SystemActionT
The interceptor.


Type Parameters

The target type

Return Value

Type: T
The value

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also