Interface ILogEntryConsumer<TEntry, TResult>
Represents the reader of the log entries.
Namespace: DotNext.IO.Log
Assembly: DotNext.IO.dll
Syntax
public interface ILogEntryConsumer<in TEntry, TResult> where TEntry : class, ILogEntry
  Type Parameters
| Name | Description | 
|---|---|
| TEntry | The interface type of the log entries supported by audit trail.  | 
      
| TResult | The type of the result produced by the reader.  | 
      
Remarks
This is an interface type instead of delegate type because it can be implemented by value type and avoid memory allocations.
Properties
| Edit this page View SourceLogEntryMetadataOnly
Indicates that the consumer has no intention to read the content of the log entries.
Declaration
bool LogEntryMetadataOnly { get; }
  Property Value
| Type | Description | 
|---|---|
| bool | 
Methods
| Edit this page View SourceReadAsync<TEntryImpl, TList>(TList, long?, CancellationToken)
Reads log entries asynchronously.
Declaration
ValueTask<TResult> ReadAsync<TEntryImpl, TList>(TList entries, long? snapshotIndex, CancellationToken token) where TEntryImpl : TEntry where TList : IReadOnlyList<TEntryImpl>
  Parameters
| Type | Name | Description | 
|---|---|---|
| TList | entries | The list of the log entries.  | 
      
| long? | snapshotIndex | Non-null if the first log entry in this list is a snapshot entry that has the specific index.  | 
      
| CancellationToken | token | The token that can be used to cancel the operation.  | 
      
Returns
| Type | Description | 
|---|---|
| ValueTask<TResult> | The result returned by the reader.  | 
      
Type Parameters
| Name | Description | 
|---|---|
| TEntryImpl | The actual type of the log entries in the list.  | 
      
| TList | The type of the list containing log entries.  | 
      
Remarks
The actual generic types for TEntryImpl and TList
are supplied by the infrastructure automatically.
Do not return TEntryImpl as a part of TResult
because log entries are valid only during the call of this method.