Class SeededFactory<T>
Creates a new specimen from a SeededRequest using a function.
Inheritance
System.Object
SeededFactory<T>
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 SeededFactory<T> : ISpecimenBuilder
Type Parameters
Name | Description |
---|---|
T | The type of specimen to create. |
Constructors
| Improve this Doc View SourceSeededFactory(Func<T, T>)
Initializes a new instance of the SeededFactory<T> class.
Declaration
public SeededFactory(Func<T, T> factory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, T> | factory | The function that will create the specimen from a seed. |
Properties
| Improve this Doc View SourceFactory
Gets the factory that is used to create specimens from a seed.
Declaration
public Func<T, T> Factory { get; }
Property Value
Type | Description |
---|---|
System.Func<T, T> |
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new specimen based on a seeded 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 result of the contained function if |