OperationQueue
StockSharp.Xaml
Runs what a control is handed from a place that cannot wait for it - an event of a provider, say - one after another, in the order it was handed, and hands a failure to the owner.
Construtores
OperationQueue
public OperationQueue(Action<Exception> failed)
operationQueue = OperationQueue(failed)
Initializes a new instance of the OperationQueue class.
- failed
- Receives what a run failed with. The runs behind it are still made.
Propriedades
Completion
public Task Completion { get; }
value = operationQueue.Completion
Completes when everything handed so far has been run. It never faults.
Métodos
Enqueue
public void Enqueue(Func<Task> operation)
operationQueue.Enqueue(operation)
Puts behind the runs already handed.
- operation
- The run.
RunAsync
public Task RunAsync(Func<Task> operation)
result = operationQueue.RunAsync(operation)
Puts behind the runs already handed, for a caller that waits for it.
- operation
- The run.
Retorna: Completes the way the run did. What it failed with goes to whoever waits, not to the owner.