Skip to content

SequenceGenerator

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)
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)
SequenceGenerator(T startValue) protected SequenceGenerator(T startValue) Protected constructor seeding CurrentValue with startValue.

Sources

  • Common/SAIF.Common/Classes/SequenceGenerator.cs