Click or drag to resize

ObjectExtensionsInterceptT Method

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

[CanBeNull]

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

Parameters

value
Type: T
The value.

[CanBeNull]

interceptor
Type: SystemActionT
The interceptor.

[NotNull]

Type Parameters

T
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