Table of Contents

Class InMemoryScenarioRegistry

Namespace
Virtufin.Base.Scenarios
Assembly
Virtufin.Base.dll

In-memory implementation of IScenarioRegistry. Suitable for tests, CI, and single-process scenarios.

public sealed class InMemoryScenarioRegistry : IScenarioRegistry
Inheritance
InMemoryScenarioRegistry
Implements
Inherited Members

Properties

All

Returns the registered scenarios (read-only view).

public IReadOnlyCollection<IScenarioConfiguration> All { get; }

Property Value

IReadOnlyCollection<IScenarioConfiguration>

Methods

Get(ScenarioId)

Look up a scenario by id. Returns null if no scenario is registered.

public IScenarioConfiguration? Get(ScenarioId id)

Parameters

id ScenarioId

Scenario id to resolve.

Returns

IScenarioConfiguration

Register(IScenarioConfiguration)

Register a new scenario. Throws if the id already exists.

public void Register(IScenarioConfiguration config)

Parameters

config IScenarioConfiguration

Scenario configuration to register.

Exceptions

ArgumentException

Thrown when config's id is already registered.