Interface IDataLoaderDiagnosticEvents
- Namespace
- GreenDonut
- Assembly
- GreenDonut.dll
This interfaces specifies the DataLoader diagnostics events.
public interface IDataLoaderDiagnosticEvents
Methods
BatchError<TKey>(IReadOnlyList<TKey>, Exception)
This event is raised whenever the executed batch had an error resolving the batch.
void BatchError<TKey>(IReadOnlyList<TKey> keys, Exception error) where TKey : notnull
Parameters
keys
IReadOnlyList<TKey>The keys that are being resolved.
error
ExceptionThe error that was thrown.
Type Parameters
TKey
The type of the keys.
BatchItemError<TKey>(TKey, Exception)
This event is raised whenever there is an error for a specific key while resolving the batch.
void BatchItemError<TKey>(TKey key, Exception error) where TKey : notnull
Parameters
key
TKeyThe key that is being resolved.
error
ExceptionThe error that was thrown.
Type Parameters
TKey
The type of the key.
BatchResults<TKey, TValue>(IReadOnlyList<TKey>, ReadOnlySpan<Result<TValue>>)
This event is raised whenever the executed batch yielded a result.
void BatchResults<TKey, TValue>(IReadOnlyList<TKey> keys, ReadOnlySpan<Result<TValue>> values) where TKey : notnull
Parameters
keys
IReadOnlyList<TKey>The keys that are being resolved.
values
ReadOnlySpan<Result<TValue>>The values that have been resolved.
Type Parameters
TKey
The type of the keys.
TValue
The type of the values.
ExecuteBatch<TKey>(IDataLoader, IReadOnlyList<TKey>)
This event is raised whenever a DataLoader batch is started to being executed.
IDisposable ExecuteBatch<TKey>(IDataLoader dataLoader, IReadOnlyList<TKey> keys) where TKey : notnull
Parameters
dataLoader
IDataLoaderThe DataLoader the batch belongs to.
keys
IReadOnlyList<TKey>The keys that are being resolved.
Returns
- IDisposable
Returns the scope that represents the execution of the batch.
Type Parameters
TKey
The type of the keys.
ResolvedTaskFromCache(IDataLoader, TaskCacheKey, Task)
This event is raised whenever a DataLoader can resolve a request from the cache.
void ResolvedTaskFromCache(IDataLoader dataLoader, TaskCacheKey cacheKey, Task task)
Parameters
dataLoader
IDataLoaderThe DataLoader that resolved the item.
cacheKey
TaskCacheKeyThe cache key.
task
TaskThe task that has been resolved.