Skip to content

Conversation

@maliming
Copy link
Member

@maliming maliming commented Jan 8, 2026

Resolve #24570

Copilot AI review requested due to automatic review settings January 8, 2026 02:33
@maliming maliming added this to the 10.0-patch-final milestone Jan 8, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors three dynamic initializers (SettingDynamicInitializer, PermissionDynamicInitializer, and FeatureDynamicInitializer) to use a service locator pattern instead of constructor injection. The changes simplify the constructors by injecting only IServiceProvider, and then resolving dependencies on-demand when they are needed.

  • Simplified constructors to accept only IServiceProvider instead of multiple dependencies
  • Changed from field-based dependency injection to on-demand service resolution using GetRequiredService/GetService
  • Removed unused JetBrains.Annotations import and [CanBeNull] attributes
  • Improved code formatting with multi-line parameter lists

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
SettingDynamicInitializer.cs Refactored to use service locator pattern, resolving IOptions, IHostApplicationLifetime, ICancellationTokenProvider, IStaticSettingSaver, and IDynamicSettingDefinitionStore on-demand
PermissionDynamicInitializer.cs Refactored to use service locator pattern, resolving IOptions, IHostApplicationLifetime, ICancellationTokenProvider, IStaticPermissionSaver, and IDynamicPermissionDefinitionStore on-demand
FeatureDynamicInitializer.cs Refactored to use service locator pattern, resolving IOptions, IHostApplicationLifetime, ICancellationTokenProvider, IStaticFeatureSaver, and IDynamicFeatureDefinitionStore on-demand

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maliming maliming requested a review from salihozkara January 8, 2026 03:14
@maliming maliming merged commit ed839ad into rel-10.0 Jan 9, 2026
8 of 10 checks passed
@maliming maliming deleted the lazy-dynamic-initializer branch January 9, 2026 02:11
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.

3 participants