Class Generator<T>
Namespace: AutoFixture
Assembly: AutoFixture.dll
Generates a perpetual sequence of items.
public class Generator<T> : IEnumerable<T>, IEnumerableType Parameters
T
The item type.
Inheritance
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
This is a generator that generates a perpetual sequence of items of
type T, based on an encapsulated
`ISpecimenBuilder`. This can be useful when zipping a
against a finite sequence, since this sequence will go on for as long
as required.
Constructors
Generator(ISpecimenBuilder)
Initializes a new instance of the Generator%601
class.
public Generator(ISpecimenBuilder builder)Parameters
builder ISpecimenBuilder
A builder which is used to generate items.
Exceptions
builder is null.
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()Returns
IEnumerator<T>