Class RangedNumberGenerator
Creates a strictly increasing sequence of ranged numbers, starting at range minimum. Sequence restarts at range minimum when range maximum is exceeded.
Inheritance
System.Object
RangedNumberGenerator
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
Assembly: AutoFixture.dll
Syntax
public class RangedNumberGenerator : ISpecimenBuilder
Constructors
| Improve this Doc View SourceRangedNumberGenerator()
Initializes a new instance of the RangedNumberGenerator class.
Declaration
public RangedNumberGenerator()
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new number based on a RangedNumberRequest.
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 number if possible; otherwise a NoSpecimen instance. |