Table of Contents

Interface IScenarioHistory

Namespace
Virtufin.Core.Contracts
Assembly
Virtufin.Core.dll

An append-only sequence of IScenario snapshots. Provides pull-based lookup (Scenario(ITimeStamp)) and a push-based observable (NewScenarios) for late subscribers — the latter is a hot Subject<IScenario> with no replay buffer.

public interface IScenarioHistory : IEnumerable<IScenario>, IEnumerable
Inherited Members

Remarks

The hot, no-replay choice means consumers that subscribe after history has been appended will not receive past scenarios — they only see future emissions, matching the semantics of the existing NatsObservable in Virtufin.Data.

Properties

Iter

Iterate scenarios in insertion order.

IEnumerable<IScenario> Iter { get; }

Property Value

IEnumerable<IScenario>

LastScenario

The most recently appended scenario.

IScenario LastScenario { get; }

Property Value

IScenario

NewScenarios

Hot observable of newly-appended scenarios. Late subscribers see no history. Use the existing Subject<T> Unsubscribe pattern for proper disposal (see AGENTS.md).

IObservable<IScenario> NewScenarios { get; }

Property Value

IObservable<IScenario>

Methods

Scenario(ITimeStamp)

Look up the first scenario matching timeStamp. Returns null if no scenario matches.

IScenario? Scenario(ITimeStamp timeStamp)

Parameters

timeStamp ITimeStamp

Time-point to search for.

Returns

IScenario