Class ListRelay
Relays a request for an System.Collections.Generic.IList<T> to a request for a System.Collections.Generic.List`1 and returns the result.
Inheritance
System.Object
ListRelay
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 has been deprecated, use \"new TypeRelay(typeof(IList<>), typeof(List<>))\" instead.")]
public class ListRelay : 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 | A populated System.Collections.Generic.IList<T> of the appropriate item type if possible; otherwise a NoSpecimen instance. |
Remarks
If request
is a request for an System.Collections.Generic.IList<T> and
context
can satisfy a request for a populated specimen of that type,
this value will be returned. If not, the return value is a NoSpecimen
instance.