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