Class ArrayRelay
Relays a request for an array to a MultipleRequest and converts the result to the desired array type.
Inheritance
System.Object
ArrayRelay
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class ArrayRelay : ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new array based on a request.
Declaration
public object Create(object request, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request that describes what to create. |
ISpecimenContext | context | A context that can be used to create other specimens. |
Returns
Type | Description |
---|---|
System.Object | An array of the requested type if possible; otherwise a NoSpecimen instance. |
Remarks
If request
is a request for an array and context
can satisfy a MultipleRequest for the element type, the return value is a
populated array of the requested type. If not, the return value is a
NoSpecimen instance.