Class EnumerableRelay
Relays a request for System.Collections.Generic.IEnumerable<T> to a MultipleRequest and converts the result to a sequence of the requested type.
Inheritance
System.Object
EnumerableRelay
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 EnumerableRelay : ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new sequence of items 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 | A sequence of the requested type if possible; otherwise a NoSpecimen instance. |
Remarks
If request
is a request for System.Collections.Generic.IEnumerable<T> and
context
can satisfy a MultipleRequest for the item
type, the return value is a populated sequence of the requested type. If not, the
return value is a NoSpecimen instance.