Class DoubleSequenceGenerator
Namespace: AutoFixture
Assembly: AutoFixture.dll
Creates a sequence of consecutive numbers, starting at 1.
public class DoubleSequenceGenerator : ISpecimenBuilderInheritance
object ← DoubleSequenceGenerator
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Extension Methods
SpecimenFactory.Create<T>(ISpecimenBuilder), SpecimenFactory.CreateMany<T>(ISpecimenBuilder), SpecimenFactory.CreateMany<T>(ISpecimenBuilder, int), SpecimenCommand.Do<T>(ISpecimenBuilder, Action<T>), SpecimenCommand.Do<T1, T2>(ISpecimenBuilder, Action<T1, T2>), SpecimenCommand.Do<T1, T2, T3>(ISpecimenBuilder, Action<T1, T2, T3>), SpecimenCommand.Do<T1, T2, T3, T4>(ISpecimenBuilder, Action<T1, T2, T3, T4>), SpecimenQuery.Get<T, TResult>(ISpecimenBuilder, Func<T, TResult>), SpecimenQuery.Get<T1, T2, TResult>(ISpecimenBuilder, Func<T1, T2, TResult>), SpecimenQuery.Get<T1, T2, T3, TResult>(ISpecimenBuilder, Func<T1, T2, T3, TResult>), SpecimenQuery.Get<T1, T2, T3, T4, TResult>(ISpecimenBuilder, Func<T1, T2, T3, T4, TResult>), CustomizationExtensions.ToCustomization(ISpecimenBuilder)
Constructors
DoubleSequenceGenerator()
Initializes a new instance of the DoubleSequenceGenerator class.
public DoubleSequenceGenerator()Methods
Create()
Creates an anonymous number.
[Obsolete("Please use the Create(request, context) method as this overload will be removed to make API uniform.")]
public double Create()Returns
Create(object, ISpecimenContext)
Creates a new specimen based on a request.
public object Create(object request, ISpecimenContext context)Parameters
request object
The request that describes what to create.
context ISpecimenContext
A context that can be used to create other specimens.
Returns
The requested specimen if possible; otherwise a NoSpecimen instance.
Remarks
The request can be any object, but will often be a
`Type` or other `MemberInfo` instances.
Note to implementers: Implementations are expected to return a `NoSpecimen` instance if they can't satisfy the request.
CreateAnonymous()
Creates an anonymous number.
[Obsolete("Please move over to using Create() as this method will be removed in the next release", true)]
public double CreateAnonymous()