Class TaskGenerator
Creates instances of System.Threading.Tasks.Task and System.Threading.Tasks.Task`1. The status will be set to System.Threading.Tasks.TaskStatus.RanToCompletion and System.Threading.Tasks.Task`1.Result will be resolved by a given ISpecimenContext.
Inheritance
Implements
Inherited Members
Namespace: AutoFixture
Assembly: AutoFixture.dll
Syntax
public class TaskGenerator : ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates instances of System.Threading.Tasks.Task and System.Threading.Tasks.Task`1.
The status will be set to System.Threading.Tasks.TaskStatus.RanToCompletion and System.Threading.Tasks.Task`1.Result will be resolved by the context
.
Declaration
public object Create(object request, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request that describes what to create. |
ISpecimenContext | context | The context that will be used to resolve the result value for generic tasks. |
Returns
Type | Description |
---|---|
System.Object | A task whose status is set to System.Threading.Tasks.TaskStatus.RanToCompletion.
If a generic task was requested, its result was resolved from the |