Table of Contents

Class DataLoaderDiagnosticEventListener

Namespace
GreenDonut
Assembly
GreenDonut.dll

A base class to create a DataLoader diagnostic event listener.

public class DataLoaderDiagnosticEventListener : IDataLoaderDiagnosticEventListener, IDataLoaderDiagnosticEvents
Inheritance
DataLoaderDiagnosticEventListener
Implements
Inherited Members

Constructors

DataLoaderDiagnosticEventListener()

public DataLoaderDiagnosticEventListener()

Properties

EmptyScope

A no-op IDisposable that can be returned from event methods that are not interested in when the scope is disposed.

protected static IDisposable EmptyScope { get; }

Property Value

IDisposable

Methods

BatchError<TKey>(IReadOnlyList<TKey>, Exception)

public virtual void BatchError<TKey>(IReadOnlyList<TKey> keys, Exception error) where TKey : notnull

Parameters

keys IReadOnlyList<TKey>
error Exception

Type Parameters

TKey

BatchItemError<TKey>(TKey, Exception)

public virtual void BatchItemError<TKey>(TKey key, Exception error) where TKey : notnull

Parameters

key TKey
error Exception

Type Parameters

TKey

BatchResults<TKey, TValue>(IReadOnlyList<TKey>, ReadOnlySpan<Result<TValue>>)

public virtual void BatchResults<TKey, TValue>(IReadOnlyList<TKey> keys, ReadOnlySpan<Result<TValue>> values) where TKey : notnull

Parameters

keys IReadOnlyList<TKey>
values ReadOnlySpan<Result<TValue>>

Type Parameters

TKey
TValue

ExecuteBatch<TKey>(IDataLoader, IReadOnlyList<TKey>)

public virtual IDisposable ExecuteBatch<TKey>(IDataLoader dataLoader, IReadOnlyList<TKey> keys) where TKey : notnull

Parameters

dataLoader IDataLoader
keys IReadOnlyList<TKey>

Returns

IDisposable

Type Parameters

TKey

ResolvedTaskFromCache(IDataLoader, TaskCacheKey, Task)

public virtual void ResolvedTaskFromCache(IDataLoader dataLoader, TaskCacheKey cacheKey, Task task)

Parameters

dataLoader IDataLoader
cacheKey TaskCacheKey
task Task