[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Rendering.Tools.EnumerableExtension.ForceInBackground

ForceInBackground Method

ForceInBackground<T>(IEnumerable<T>, CancellationToken)

Forces evaluation of the given IEnumerable<T> in a separate thread and returns a new IEnumerable<T> to be enumerated in the current thread.

Declaration
public static IEnumerable<T> ForceInBackground<T>(this IEnumerable<T> src, CancellationToken cancellationToken)
Parameters
Type Name Description
IEnumerable<T> src

The source sequence.

CancellationToken cancellationToken

A token to cancel enumeration.

Returns
Type Description
IEnumerable<T>

A sequence that is evaluated in a background thread.

Type Parameters
Name Description
T

The type of elements in the sequence.

ForceInBackground<T>(IEnumerable<T>, CancellationToken, int)

Forces evaluation of the given IEnumerable<T> in a separate thread and returns a new IEnumerable<T> to be enumerated in the current thread.

Declaration
public static IEnumerable<T> ForceInBackground<T>(this IEnumerable<T> src, CancellationToken cancellationToken, int maxBufferSize)
Parameters
Type Name Description
IEnumerable<T> src

The source sequence.

CancellationToken cancellationToken

A token to cancel enumeration.

int maxBufferSize

The maximum buffer size. If zero, the size is unlimited.

Returns
Type Description
IEnumerable<T>

A sequence that is evaluated in a background thread.

Type Parameters
Name Description
T

The type of elements in the sequence.