Table of Contents

Class ConsumerExtensions

Namespace
BenchmarkDotNet.Engines
Assembly
BenchmarkDotNet.dll
public static class ConsumerExtensions
Inheritance
ConsumerExtensions

Methods

Consume(IEnumerable, Consumer)

executes and consumes given IEnumerable By using non-generic IEnumerable you pay for boxing. Use generic IEnumerable<T> if you can.

public static void Consume(this IEnumerable enumerable, Consumer consumer)

Parameters

enumerable IEnumerable

non-generic IEnumerable

consumer Consumer

instance of Consumer. Create it on your own once, store it in the field and just pass here

Consume(IQueryable, Consumer)

executes and consumes given IQueryable By using non-generic IQueryable you pay for boxing. Use generic IQueryable<T> if you can.

public static void Consume(this IQueryable queryable, Consumer consumer)

Parameters

queryable IQueryable

non-generic IQueryable

consumer Consumer

instance of Consumer. Create it on your own once, store it in the field and just pass here

Consume<T>(IEnumerable<T>, Consumer)

executes and consumes given IEnumerable<T>

public static void Consume<T>(this IEnumerable<T> enumerable, Consumer consumer)

Parameters

enumerable IEnumerable<T>

generic IEnumerable<T>

consumer Consumer

instance of Consumer. Create it on your own once, store it in the field and just pass here

Type Parameters

T

Consume<T>(IQueryable<T>, Consumer)

executes and consumes given IQueryable<T>

public static void Consume<T>(this IQueryable<T> queryable, Consumer consumer)

Parameters

queryable IQueryable<T>

generic IQueryable<T>

consumer Consumer

instance of Consumer. Create it on your own once, store it in the field and just pass here

Type Parameters

T