Show / Hide Table of Contents

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 Source

LogEntryMetadataOnly

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 Source

ReadAsync<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.

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.GetUserData<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, ReadOnlySpan<T>)
ExpressionBuilder.Const<T>(T)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, bool, TimeSpan, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan, CancellationToken)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾