---
title: SequenceGenerator<T>
summary: API reference for SequenceGenerator<T>.
status: draft
owner: saif-docgen
last_reviewed: 2026-09-15
library: SAIF.Framework.Common
reference_type: package
---

# SequenceGenerator<T>

Abstract base for in-memory monotonic sequence generators; concrete subclasses (`Sequence`, `LongSequence`) supply the increment logic for a specific numeric type.

## Purpose
- Abstract base for in-memory monotonic sequence generators; concrete subclasses (`Sequence`, `LongSequence`) supply the increment logic for a specific numeric type.

## Context
- Namespace: `SAIF.Common`
- Assembly/package: `SAIF.Framework.Common`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| CurrentValue | `public T CurrentValue { get; protected set; }` | The most recently produced value, without advancing the sequence. |
| NextValue | `public abstract T NextValue { get; }` | Advances the sequence and returns the new current value; implemented by subclasses. ([BR-066](../../business-rules.md#br-066-nextvalue-is-pre-increment)) |
| SetValue(T value) | `public void SetValue(T value)` | Overwrites `CurrentValue` directly, re-seeding the sequence without generating a new value. |
| Reset() | `public abstract void Reset()` | Resets the sequence to its type-specific starting value; implemented by subclasses. ([BR-067](<../../business-rules.md#br-067-reset()-returns-the-counter-to-literal-zero%2C-not-to-the-original-start-value>)) |
| SequenceGenerator(T startValue) | `protected SequenceGenerator(T startValue)` | Protected constructor seeding `CurrentValue` with `startValue`. |


## Sources
- `Common/SAIF.Common/Classes/SequenceGenerator.cs`
