1using System.Threading.Tasks;
12 private readonly PredicateAsync<T> callback;
21 this.callback = Callback;
34 public bool Process(T Object) => this.callback(Object).Result;
58 return Task.FromResult(
true);
Processor that uses an asynchronous predicate callback to process objects.
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.
bool IsAsynchronous
If the processor operates asynchronously.
PredicateAsyncProcessor(PredicateAsync< T > Callback)
Processor that uses an asynchronous predicate callback to process objects.
Task< bool > ProcessAsync(T Object)
Processes an object asynchronously.
bool Process(T Object)
Processes an object synchronously.
Interface for processors of objects.