Class TaskQueue
Task queue to encapsulate chaining of tasks.
Implements
Inherited Members
Namespace: Microsoft.Graph.Communications.Common
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public class TaskQueue : ObjectRootDisposable, IDisposable
Constructors
TaskQueue(IGraphLogger, Task)
Initializes a new instance of the TaskQueue class.
Declaration
public TaskQueue(IGraphLogger logger, Task antecedent = null)
Parameters
Type | Name | Description |
---|---|---|
IGraphLogger | logger | Logger instance. |
Task | antecedent | Optional antecedent task. |
Methods
Dispose(Boolean)
Protected implementation of dispose. This will be triggered only once regardless if manually disposed or garbage collected.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing |
|
Overrides
EnqueueAsync(Func<Task, Task>)
Enqueue an operation
Declaration
public Task EnqueueAsync(Func<Task, Task> operation)
Parameters
Type | Name | Description |
---|---|---|
Func<Task, Task> | operation | Operation to queue. |
Returns
Type | Description |
---|---|
Task | A task that represents the queued operation. |