Class MultipleToEnumerableRelay
Relays a MultipleRequest to a request for System.Collections.Generic.IEnumerable<T>.
Inheritance
System.Object
MultipleToEnumerableRelay
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
[Obsolete("This relay is obsolete and will be removed in future versions. The reason is that it causes recursion overflow for many requests if you forget to add IEnumerable<T> customization.")]
public class MultipleToEnumerableRelay : ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new specimen 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 | The requested specimen if possible; otherwise a NoSpecimen instance. |
Remarks
The request
can be any object, but will often
be a System.Type or other
System.Reflection.MemberInfo instances. This
particular implementation only handles
MultipleRequest instances.
Request must either be a Type
instance, or a SeededRequest with a Type as its
Request. If the request doesn't
satisfy these conditions, a NoSpecimen instance is
returned.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | context is null. |