2using System.Threading.Tasks;
14 private long nrCollections = 0;
15 private long nrBlocks = 0;
16 private long nrEntries = 0;
17 private long nrProperties = 0;
54 return this.output?.StartLedger() ?? Task.FromResult(
true);
63 return this.output?.EndLedger() ?? Task.FromResult(
true);
74 return this.output?.StartCollection(CollectionName) ?? Task.FromResult(
true);
83 return this.output?.EndCollection() ?? Task.FromResult(
true);
94 return this.output?.StartBlock(BlockID) ?? Task.FromResult(
true);
105 return this.output?.BlockMetaData(Key, Value) ?? Task.FromResult(
true);
114 return this.output?.EndBlock() ?? Task.FromResult(
true);
128 return this.output?.StartEntry(ObjectId, TypeName,
EntryType, EntryTimestamp) ?? Task.FromResult(
true);
140 return this.output?.ReportProperty(PropertyName, PropertyValue) ?? Task.FromResult(
true);
149 return this.output?.EndEntry() ?? Task.FromResult(
true);
159 return this.output?.CollectionCleared(EntryTimestamp) ?? Task.FromResult(
true);
169 return this.output?.ReportError(Message) ?? Task.FromResult(
true);
179 return this.output?.ReportException(Exception) ?? Task.FromResult(
true);
Class that counts exported elements.
Task< bool > EndEntry()
Is called when an entry is finished.
Task< bool > ReportException(Exception Exception)
Is called when an exception has occurred.
long NrEntries
Number of entries processed
Task< bool > StartLedger()
Is called when export of ledger is started.
Task< bool > CollectionCleared(DateTimeOffset EntryTimestamp)
Is called when the collection has been cleared.
long NrCollections
Number of collections processed
long NrProperties
Number of properties processed
Task< bool > BlockMetaData(string Key, object Value)
Reports block meta-data.
Task< bool > StartBlock(string BlockID)
Is called when a block in a collection is started.
Task< bool > StartEntry(string ObjectId, string TypeName, EntryType EntryType, DateTimeOffset EntryTimestamp)
Is called when an entry is started.
ExportCounter(ILedgerExport Output)
Class that counts exported elements.
Task< bool > EndLedger()
Is called when export of ledger is finished.
Task< bool > EndCollection()
Is called when a collection is finished.
Task< bool > EndBlock()
Is called when a block in a collection is finished.
Task< bool > ReportProperty(string PropertyName, object PropertyValue)
Is called when a property is reported.
long NrBlocks
Number of blocks processed
Task< bool > ReportError(string Message)
Is called when an error is reported.
Task< bool > StartCollection(string CollectionName)
Is called when a collection is started.
Interface for ledger exports.
EntryType
Ledger entry type.