Class DecimalSequenceGenerator
Creates a sequence of consecutive numbers, starting at 1.
Inheritance
System.Object
DecimalSequenceGenerator
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 DecimalSequenceGenerator : ISpecimenBuilder
Constructors
| Improve this Doc View SourceDecimalSequenceGenerator()
Initializes a new instance of the Int64SequenceGenerator class.
Declaration
public DecimalSequenceGenerator()
Methods
| Improve this Doc View SourceCreate()
Creates an anonymous number.
Declaration
[Obsolete("Please use the Create(request, context) method as this overload will be removed to make API uniform.")]
public decimal Create()
Returns
Type | Description |
---|---|
System.Decimal |
Create(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.
Note to implementers: Implementations are expected to return a NoSpecimen instance if they can't satisfy the request.
CreateAnonymous()
Creates an anonymous number.
Declaration
[Obsolete("Please move over to using Create() as this method will be removed in the next release", true)]
public decimal CreateAnonymous()
Returns
Type | Description |
---|---|
System.Decimal |