2using System.Threading.Tasks;
15 private readonly
bool isAsynchronous;
28 this.processor = Processor;
30 this.conditions = Conditions;
31 this.isAsynchronous = Processor.IsAsynchronous || Conditions.
IsAsynchronous;
48 if (this.properties is
null)
51 this.properties.Object = Object;
53 IElement E = this.conditions.Evaluate(this.properties);
57 return this.processor.Process(Object);
74 if (this.properties is
null)
77 this.properties.Object = Object;
79 IElement E = await this.conditions.EvaluateAsync(this.properties);
83 return await this.processor.ProcessAsync(Object);
95 public bool Flush() => this.processor.Flush();
101 public Task<bool>
FlushAsync() => this.processor.FlushAsync();
Base class for all nodes in a parsed script tree.
virtual bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
Processor that only processes elements matching a set of conditions.
ConditionalProcessor(IProcessor< object > Processor, Variables Variables, ScriptNode Conditions)
Processor that only processes elements matching a set of conditions.
bool IsAsynchronous
If the processor operates asynchronously.
bool Process(object Object)
Processes an object synchronously.
Task< bool > FlushAsync()
Called at the end of processing, to allow for flushing of buffers, etc.
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.
Interface for processors of objects.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.