Class ConfigurationSetRegistration
Startup registration handle for one named configuration set.
Inherited Members
Namespace: Eigenverft.NetLib.Infrastructure.Hosting.Configuration.ConfigurationSets
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public sealed class ConfigurationSetRegistration
Remarks
This type is startup convenience only. Application-level runtime control should normally use IConfigurationSetManager for ephemeral switches or IConfigurationSetDesiredStateStore when desired state must persist. Keyed IConfigurationSetCoordinator access remains available for advanced set-specific integration, while IConfigurationSetEventHub provides host-wide observation.
Properties
| Edit this page View SourceCoordinator
Gets the registered runtime coordinator.
Declaration
public IConfigurationSetCoordinator Coordinator { get; }
Property Value
| Type | Description |
|---|---|
| IConfigurationSetCoordinator |
Name
Gets the caller-defined set identity.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceAddSwitchableJson(Func<string, string>, bool, bool, int, SwitchableJsonRuntimeFailurePolicy)
Registers one switchable JSON source using an arbitrary complete path mapping for the allowed set values.
Declaration
public ConfigurationSetRegistration AddSwitchableJson(Func<string, string> sourcePathResolver, bool optional = false, bool reloadOnChange = false, int reloadDelayMilliseconds = 250, SwitchableJsonRuntimeFailurePolicy runtimeFailurePolicy = SwitchableJsonRuntimeFailurePolicy.KeepLastKnownGood)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<string, string> | sourcePathResolver | Resolves the complete JSON source path for each allowed set value. |
| bool | optional | Whether a missing active source is treated as empty by framework-driven loads. |
| bool | reloadOnChange | Whether the active JSON source is watched independently for physical changes. |
| int | reloadDelayMilliseconds | Debounce delay for active-source file notifications. |
| SwitchableJsonRuntimeFailurePolicy | runtimeFailurePolicy | Runtime failure policy used by the switchable JSON source. |
Returns
| Type | Description |
|---|---|
| ConfigurationSetRegistration | This registration handle for chaining. |
AddSwitchableJson(string, SwitchableJsonRegistrationOptions, params string[])
Registers multiple independent switchable JSON sources in the same {rootPath}/{setValue} directory
while applying the same source options to every file.
Declaration
public ConfigurationSetRegistration AddSwitchableJson(string rootPath, SwitchableJsonRegistrationOptions options, params string[] fileNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string | rootPath | Root directory containing one subdirectory per allowed set value. |
| SwitchableJsonRegistrationOptions | options | Shared switchable JSON registration options applied to every file. |
| string[] | fileNames | JSON file paths within each set-value directory. |
Returns
| Type | Description |
|---|---|
| ConfigurationSetRegistration | This registration handle for chaining. |
AddSwitchableJson(string, string, bool, bool, int, SwitchableJsonRuntimeFailurePolicy)
Registers one switchable JSON source whose path follows {rootPath}/{setValue}/{fileName}.
The technical participant identity is derived automatically for DI and diagnostics.
Declaration
public ConfigurationSetRegistration AddSwitchableJson(string rootPath, string fileName, bool optional = false, bool reloadOnChange = false, int reloadDelayMilliseconds = 250, SwitchableJsonRuntimeFailurePolicy runtimeFailurePolicy = SwitchableJsonRuntimeFailurePolicy.KeepLastKnownGood)
Parameters
| Type | Name | Description |
|---|---|---|
| string | rootPath | |
| string | fileName | |
| bool | optional | |
| bool | reloadOnChange | |
| int | reloadDelayMilliseconds | |
| SwitchableJsonRuntimeFailurePolicy | runtimeFailurePolicy |
Returns
| Type | Description |
|---|---|
| ConfigurationSetRegistration |
AddSwitchableJson(string, params string[])
Registers multiple independent switchable JSON sources in the same {rootPath}/{setValue} directory using default source options.
Technical participant identities are derived automatically from the set and logical file paths.
Declaration
public ConfigurationSetRegistration AddSwitchableJson(string rootPath, params string[] fileNames)
Parameters
| Type | Name | Description |
|---|---|---|
| string | rootPath | Root directory containing one subdirectory per allowed set value. |
| string[] | fileNames | JSON file paths within each set-value directory. |
Returns
| Type | Description |
|---|---|
| ConfigurationSetRegistration | This registration handle for chaining. |
ApplyMode(ConfigurationSetApplyMode)
Configures how this set's desired value may be applied when a desired-state store is used.
Declaration
public ConfigurationSetRegistration ApplyMode(ConfigurationSetApplyMode applyMode)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurationSetApplyMode | applyMode | Whether desired-state changes may apply at runtime or only during host startup. |
Returns
| Type | Description |
|---|---|
| ConfigurationSetRegistration | This registration handle for chaining. |