2using System.Threading.Tasks;
19 private readonly
bool[] columnAsynchronous;
21 private readonly
int count;
22 private readonly
bool isAsynchronous;
30 this.columns = Columns;
32 this.count = this.columns?.Length ?? 0;
33 this.columnAsynchronous =
new bool[this.count];
35 for (
int i = 0; i < this.count; i++)
37 bool b = this.columnAsynchronous[i] = this.columns[i].IsAsynchronous;
38 this.isAsynchronous |= b;
50 public int Count => this.items.Count;
58 return this.items.ToArray();
68 if (!this.items.HasFirstItem)
73 else if (this.items.Count == 1 &&
this.items.FirstItem.Length == 1)
75 Result = this.items.FirstItem[0];
96 if (this.properties is
null)
101 if (this.columns is
null)
107 for (i = 0; i < this.count; i++)
111 Record[i] = this.columns[i].Evaluate(this.properties);
146 if (this.properties is
null)
151 if (this.columns is
null)
157 for (i = 0; i < this.count; i++)
161 if (this.columnAsynchronous[i])
162 Record[i] = await this.columns[i].EvaluateAsync(this.properties);
164 Record[i] = this.columns[i].Evaluate(this.properties);
194 return Task.FromResult(
true);
Static class managing the application event log. Applications and services log events on this static ...
static Exception UnnestException(Exception Exception)
Unnests an exception, to extract the relevant inner exception.
A chunked list is a linked list of chunks of objects of type T .
Base class for all types of elements.
abstract object AssociatedObjectValue
Associated object value.
Class managing a script expression.
static IElement Encapsulate(object Value)
Encapsulates an object.
Base class for all nodes in a parsed script tree.
static readonly ObjectValue Null
Null value.
Processor that generates a tabular record set.
bool IsAsynchronous
If the processor operates asynchronously.
RecordProcessor(ScriptNode[] Columns, Variables Variables)
Processor that generates a tabular record set.
IElement[][] GetRecordSet()
Gets the generated record set.
bool TryGetSingleElement(out IElement Result)
Tries to get a single element result.
bool Flush()
Called at the end of processing, to allow for flushing of buffers, etc.
async Task< bool > ProcessAsync(object Object)
Processes an object asynchronously.
virtual void ProcessRecord(IElement[] Record)
Processes a record.
int Count
Number of records processed.
Task< bool > FlushAsync()
Called at the end of processing, to allow for flushing of buffers, etc.
bool Process(object Object)
Processes an object synchronously.
Interface for processors of objects.
Basic interface for all types of elements.