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 configuration updates
302
302
-**Post-configuration support**: `PostConfigure` callbacks for normalizing/transforming values after binding (e.g., path normalization, URL lowercase)
303
+
-**ConfigureAll support**: Set common default values for all named options instances before individual binding with `ConfigureAll` callbacks (e.g., baseline retry/timeout settings)
303
304
-**Named options support**: Multiple configurations of the same options type with different names (e.g., Primary/Secondary email servers)
304
305
-**Nested subsection binding**: Automatic binding of complex properties to configuration subsections (e.g., `StorageOptions.Database.Retry` → `"Storage:Database:Retry"`) - supported out-of-the-box by Microsoft's `.Bind()` method
| ❌ |[Options Snapshots for Specific Sections](#8-options-snapshots-for-specific-sections)| 🟢 Low-Medium |
84
84
| ❌ |[Compile-Time Section Name Validation](#9-compile-time-section-name-validation)| 🟡 Medium |
85
85
| ❌ |[Auto-Generate Options Classes from appsettings.json](#10-auto-generate-options-classes-from-appsettingsjson)| 🟢 Low |
@@ -599,28 +599,66 @@ public class DatabaseRetryPolicy
599
599
### 7. ConfigureAll Support
600
600
601
601
**Priority**: 🟢 **Low-Medium**
602
-
**Status**: ❌ Not Implemented
602
+
**Status**: ✅ **Implemented**
603
603
604
-
**Description**: Support configuring all named instances of an options type at once (e.g., setting defaults).
604
+
**Description**: Support configuring all named instances of an options type at once, allowing you to set common defaults that apply to all named configurations before individual settings override them.
605
605
606
606
**Example**:
607
607
608
608
```csharp
609
-
// Configure defaults for ALL named DatabaseOptions instances
-**🚨 Error on missing keys** - Fail-fast validation when configuration sections are missing (`ErrorOnMissingKeys`) to catch deployment issues at startup
747
747
-**🔔 Configuration change callbacks** - Automatically respond to configuration changes at runtime with `OnChange` callbacks (requires Monitor lifetime)
748
748
-**🔧 Post-configuration support** - Normalize or transform values after binding with `PostConfigure` callbacks (e.g., ensure paths have trailing slashes, lowercase URLs)
749
+
-**🎛️ ConfigureAll support** - Set common default values for all named options instances before individual binding with `ConfigureAll` callbacks (e.g., baseline retry/timeout settings)
749
750
-**📛 Named options** - Multiple configurations of the same options type with different names (e.g., Primary/Secondary email servers)
750
751
-**🎯 Explicit section paths** - Support for nested sections like `"App:Database"` or `"Services:Email"`
@@ -1478,6 +1479,141 @@ The generator performs compile-time validation of PostConfigure callbacks:
1478
1479
1479
1480
---
1480
1481
1482
+
### 🎛️ ConfigureAll Support
1483
+
1484
+
Set default values for **all named options instances** before individual configuration binding. This feature is perfect for establishing common baseline settings across multiple named configurations that can then be selectively overridden.
1485
+
1486
+
**Requirements:**
1487
+
- Requires multiple named instances (at least 2)
1488
+
- Callback method must have signature: `static void MethodName(TOptions options)`
0 commit comments