Class AsyncRequest<T>
Concrete AsyncRequest for specific type T.
Implements
Inherited Members
Namespace: Unity.Simulation
Assembly: solution.dll
Syntax
public class AsyncRequest<T> : AsyncRequest, IDisposable
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
| Name | Description |
|---|---|
| AsyncRequest() | Default constructor for AsyncRequest. |
Properties
| Name | Description |
|---|---|
| data | Returns a reference to the payload for this request. |
| results | Array of asynchronous results. |
Methods
| Name | Description |
|---|---|
| AllResultsAreCompleted() | All results are completed if...
|
| AnyResultHasError() | Returns true if any of the results had an error. |
| Dispose() | Disposes the request. This will add the request back to the object pool. |
| DontCare(AsyncRequest<T>) | You can use this method to complete a request without needing a lambda function. Passing null will likely cause work to be skipped, but passing this will do it and complete. |
| Enqueue(Func<AsyncRequest<T>, Result>) | Queues a unit of work that can be executed on start. |
| Execute(ExecutionContext) | Starts executing all the queued callback functions in the given execution context. |
| ~AsyncRequest() | |
| Reset() | Resets the request. Called when adding back to the object pool. |
| Start(Func<AsyncRequest<T>, Result>, ExecutionContext) | Queues a callback that needs to be executed in the given execution context, and starts the request. |
Operators
| Name | Description |
|---|---|
| operator +(AsyncRequest<T>, Func<AsyncRequest<T>, Result>) | Operator overload for adding functors to the AsyncRequest queue. |