You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**🔔 Configuration Change Callbacks**: Auto-generated IHostedService for OnChange notifications with Monitor lifetime - perfect for feature flags and runtime config updates
355
355
-**🔧 Post-Configuration Support**: Normalize or transform values after binding with `PostConfigure` callbacks (e.g., ensure paths have trailing slashes, lowercase URLs)
356
356
-**📛 Named Options**: Multiple configurations of the same options type with different names (e.g., Primary/Secondary email servers)
357
+
-**⚡ Early Access to Options**: Retrieve bound and validated options during service registration without BuildServiceProvider() anti-pattern (via `GetOrAdd*` methods)
357
358
-**🎯 Explicit Section Paths**: Support for nested sections like `"App:Database"` or `"Services:Email"`
358
359
-**📂 Nested Subsection Binding**: Automatic binding of complex properties to configuration subsections (e.g., `StorageOptions.Database.Retry` → `"Storage:Database:Retry"`)
359
360
-**📦 Multiple Options Classes**: Register multiple configuration sections in a single assembly with one method call
> **📝 Implementation Note:** This feature is fully implemented with three APIs:
870
+
> 1.`Get[Type]From[Assembly]()` - Reads cache, doesn't populate (efficient, no side effects)
871
+
> 2.`GetOrAdd[Type]From[Assembly]()` - Reads AND populates cache (idempotent)
872
+
> 3.`GetOptions<T>()` - Smart dispatcher for multi-assembly projects (calls Get internally)
873
+
>
874
+
> See [OptionsBindingGenerators.md](OptionsBindingGenerators.md#-early-access-to-options-avoid-buildserviceprovider-anti-pattern) for current usage.
875
+
869
876
**Description**: Enable access to bound and validated options instances **during** service registration without calling `BuildServiceProvider()`, which is a known anti-pattern that causes memory leaks, scope issues, and application instability.
870
877
871
878
**User Story**:
@@ -1636,7 +1643,7 @@ Based on priority, user demand, and implementation complexity:
0 commit comments