3using System.Threading.Tasks;
21 private Dictionary<string, IElement> currentCollection =
null;
22 private Dictionary<string, IElement> currentBlock =
null;
23 private Dictionary<string, IElement> currentEntry =
null;
24 private Dictionary<string, IElement> propertiesInEvent =
null;
49 return Task.FromResult(
true);
58 return Task.FromResult(
true);
68 this.currentCollection =
new Dictionary<string, IElement>()
73 this.blocksInCollection.Clear();
75 return Task.FromResult(
true);
84 if (this.blocksInCollection.Count > 0)
86 this.currentCollection[
"Blocks"] =
new ObjectVector(this.blocksInCollection.ToArray());
87 this.collections.Add(
new ObjectValue(this.currentCollection));
90 return Task.FromResult(
true);
100 this.currentBlock =
new Dictionary<string, IElement>()
105 this.eventsInBlock.Clear();
107 return Task.FromResult(
true);
119 return Task.FromResult(
true);
128 if (this.eventsInBlock.Count > 0)
130 this.currentBlock[
"Events"] =
new ObjectVector(this.eventsInBlock.ToArray());
131 this.blocksInCollection.Add(
new ObjectValue(this.currentBlock));
134 return Task.FromResult(
true);
147 this.propertiesInEvent =
new Dictionary<string, IElement>();
148 this.currentEntry =
new Dictionary<string, IElement>()
154 {
"this",
new ObjectValue(this.propertiesInEvent) }
157 return Task.FromResult(
true);
169 return Task.FromResult(
true);
178 this.eventsInBlock.Add(
new ObjectValue(this.currentEntry));
179 return Task.FromResult(
true);
189 return Task.FromResult(
true);
199 return Task.FromResult(
true);
209 return Task.FromResult(
true);
A chunked list is a linked list of chunks of objects of type T .
Class managing a script expression.
static IElement Encapsulate(object Value)
Encapsulates an object.
Export is serialized into object form.
Task< bool > ReportProperty(string PropertyName, object PropertyValue)
Is called when a property is reported.
Task< bool > StartLedger(ILedgerProvider Provider)
Is called when export of ledger is started.
Task< bool > EndCollection()
Is called when a collection is finished.
Task< bool > CollectionCleared(DateTimeOffset EntryTimestamp)
Is called when the collection has been cleared.
Task< bool > ReportError(string Message)
Is called when an error is reported.
ExportToJson()
Export is serialized into object form.
Task< bool > EndBlock()
Is called when a block in a collection is finished.
Task< bool > EndEntry()
Is called when an entry is finished.
Task< bool > ReportException(Exception Exception)
Is called when an exception has occurred.
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.
IVector ToVector()
Returns an array of exported objects.
Task< bool > EndLedger()
Is called when export of ledger is finished.
Task< bool > StartCollection(string CollectionName)
Is called when a collection is started.
Task< bool > StartEntry(string ObjectId, string TypeName, EntryType EntryType, DateTimeOffset EntryTimestamp)
Is called when an entry is started.
Interface for ledger providers that can be plugged into the static Ledger class.
Interface for ledger exports.
Basic interface for vectors.
EntryType
Ledger entry type.