Class LogEntryProducer<TEntry>
Represents default implementation of ILogEntryProducer<TEntry> backed by the list of the log entries.
Inherited Members
Namespace: DotNext.IO.Log
Assembly: DotNext.IO.dll
Syntax
public sealed class LogEntryProducer<TEntry> : ILogEntryProducer<TEntry>, IAsyncEnumerator<TEntry>, IAsyncDisposable where TEntry : ILogEntry
Type Parameters
| Name | Description |
|---|---|
| TEntry | The type of the supplied entries. |
Constructors
| Improve this Doc View SourceLogEntryProducer()
Initializes a new empty producer of the log entries.
Declaration
public LogEntryProducer()
LogEntryProducer(TEntry[])
Initializes a new producer of the log entries passed as array.
Declaration
public LogEntryProducer(params TEntry[] entries)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntry[] | entries | The log entries to be returned by the producer. |
LogEntryProducer(IList<TEntry>)
Initializes a new producer of the log entries passed as list.
Declaration
public LogEntryProducer(IList<TEntry> entries)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<TEntry> | entries | The list of the log entries to be returned by the producer. |
Methods
| Improve this Doc View SourceOf(TEntry)
Constructs producer of single log entry.
Declaration
public static ILogEntryProducer<TEntry> Of(TEntry entry)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntry | entry | The entry to be exposed by producer. |
Returns
| Type | Description |
|---|---|
| ILogEntryProducer<TEntry> | The producer of single log entry. |
Reset()
Resets the position of the producer.
Declaration
public void Reset()
Explicit Interface Implementations
| Improve this Doc View SourceILogEntryProducer<TEntry>.RemainingCount
Declaration
long ILogEntryProducer<TEntry>.RemainingCount { get; }
Returns
| Type | Description |
|---|---|
| Int64 |
IAsyncEnumerator<TEntry>.Current
Declaration
TEntry IAsyncEnumerator<TEntry>.Current { get; }
Returns
| Type | Description |
|---|---|
| TEntry |
IAsyncEnumerator<TEntry>.MoveNextAsync()
Declaration
ValueTask<bool> IAsyncEnumerator<TEntry>.MoveNextAsync()
Returns
| Type | Description |
|---|---|
| ValueTask<Boolean> |
IAsyncDisposable.DisposeAsync()
Declaration
ValueTask IAsyncDisposable.DisposeAsync()
Returns
| Type | Description |
|---|---|
| ValueTask |