Traces the elements of a source sequence for diagnostics using
a custom formatter.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static IEnumerable<TSource> Trace<TSource>( this IEnumerable<TSource> source, Func<TSource, string> formatter )
<ExtensionAttribute> _ Public Shared Function Trace(Of TSource) ( _ source As IEnumerable(Of TSource), _ formatter As Func(Of TSource, String) _ ) As IEnumerable(Of TSource)
public: [ExtensionAttribute] generic<typename TSource> static IEnumerable<TSource>^ Trace( IEnumerable<TSource>^ source, Func<TSource, String^>^ formatter )
Generic Template Parameters
- TSource
- Type of element in the source sequence
Parameters
- source (IEnumerable<(Of <(<'TSource>)>)>)
- Source sequence whose elements to trace.
Return Value
Return the source sequence unmodified.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'TSource>)>)>. When you use instance method syntax to call this method, omit the first parameter.
Remarks
This a pass-through operator that uses deferred execution and
streams the results.
Assembly: MoreLinq (Module: MoreLinq.dll) Version: 1.0.16006.0 (1.0.16006.1845)