Feature: Dependency Injection & Keyed Registrations

Purpose

Make storage wiring predictable and scalable for .NET apps by supporting both a single default IStorage and multiple keyed storage registrations (multi-tenant, multi-region, mirroring):

Main Flows

Default registration

flowchart LR
  App --> DI[ServiceCollection]
  DI --> Default["IStorage (default)"]
  Default --> Provider[Concrete provider storage]

Keyed registration (multi-storage)

flowchart LR
  App --> DI[ServiceCollection]
  DI --> A["IStorage keyed: tenant-a"]
  DI --> B["IStorage keyed: tenant-b"]
  A --> ProviderA[Provider instance A]
  B --> ProviderB[Provider instance B]

Components

Core factory abstractions:

Provider registrations:

Keyed DI:

Current Behavior

Tests

Definition of Done