Class ConfigurationSetSwitchableJsonExtensions
Provides advanced binding of existing switchable JSON runtimes to NetLib-created configuration-set coordinators.
Inherited Members
Namespace: Eigenverft.NetLib.Infrastructure.Hosting.Configuration.ConfigurationSets
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public static class ConfigurationSetSwitchableJsonExtensions
Methods
| Edit this page View SourceBindSwitchableJson(IConfigurationSetCoordinator, ISwitchableJsonConfiguration, Func<string, string>)
Binds one switchable JSON configuration runtime to this set by defining the source path used for each allowed value.
Declaration
public static IConfigurationSetCoordinator BindSwitchableJson(this IConfigurationSetCoordinator coordinator, ISwitchableJsonConfiguration configuration, Func<string, string> sourcePathResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| IConfigurationSetCoordinator | coordinator | The set coordinator that owns the logical value transition. |
| ISwitchableJsonConfiguration | configuration | The independently registered switchable JSON runtime to coordinate. |
| Func<string, string> | sourcePathResolver | Resolves a JSON source path for every allowed set value. The mapping is evaluated and frozen during binding. |
Returns
| Type | Description |
|---|---|
| IConfigurationSetCoordinator | The same coordinator for chaining. |
Remarks
Binding validates that the switchable runtime is already on the source mapped to the coordinator's current active value. Once bound, the coordinator exclusively owns source selection for that runtime. Direct public source switches are rejected, while active-file reload and lifecycle observation remain normal switchable-runtime behavior. A runtime can belong to only one configuration set at a time. This advanced binding path is supported only for coordinators created by NetLib configuration-set registration. Custom IConfigurationSetCoordinator implementations are not supported by this operation.
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException |
|