Skip to content

refactor(map)!: use FrozenDictionary for map definitions - #1

Merged
DevD4v3 merged 1 commit into
masterfrom
breaking/map-service-frozen-dictionary
Jul 28, 2026
Merged

refactor(map)!: use FrozenDictionary for map definitions#1
DevD4v3 merged 1 commit into
masterfrom
breaking/map-service-frozen-dictionary

Conversation

@DevD4v3

@DevD4v3 DevD4v3 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Replace the mutable dictionary of map definitions with FrozenDictionary.

The registered dictionaries are created only once during the first resolution and remain alive for the lifetime of the application. As the collection is immutable after construction, FrozenDictionary better represents its intended usage through the type system and optimizes lookups for scenarios with a large number of registered map definitions.

BREAKING CHANGE: Dictionary<string, MapDefinition> is no longer registered in the dependency injection container. Consumers should depend on FrozenDictionary<string, MapDefinition> instead.

Replace the mutable dictionary of map definitions with FrozenDictionary.

The registered dictionaries are created only once during the first resolution and remain alive for the lifetime of the application. As the collection is immutable after construction, FrozenDictionary better represents its intended usage through the type system and optimizes lookups for scenarios with a large number of registered map definitions.

BREAKING CHANGE: Dictionary<string, MapDefinition> is no longer registered in the dependency injection container. Consumers should depend on FrozenDictionary<string, MapDefinition> instead.
@DevD4v3
DevD4v3 merged commit 2651616 into master Jul 28, 2026
1 check passed
@DevD4v3
DevD4v3 deleted the breaking/map-service-frozen-dictionary branch July 28, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant