Class ConfigurationSetDefinition
Defines one named configuration-set axis and the values that are valid for that axis.
Inherited Members
Namespace: Eigenverft.NetLib.Infrastructure.Hosting.Configuration.ConfigurationSets
Assembly: Eigenverft.NetLib.Infrastructure.dll
Syntax
public sealed class ConfigurationSetDefinition
Remarks
The coordinator assigns no application meaning to either the name or the values. A caller may use a set for environments, proxy behavior, build generations, feature collections, deployment lanes, or any other convention.
Constructors
| Edit this page View SourceConfigurationSetDefinition(string, string, IEnumerable<string>)
Initializes a configuration-set definition.
Declaration
public ConfigurationSetDefinition(string name, string initialValue, IEnumerable<string> allowedValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Caller-defined identity of the independent set axis. |
| string | initialValue | Value that is active when the coordinator is created. |
| IEnumerable<string> | allowedValues | Complete set of values that may become active. |
Properties
| Edit this page View SourceAllowedValues
Gets the complete ordered collection of values accepted by this set.
Declaration
public IReadOnlyList<string> AllowedValues { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
InitialValue
Gets the value that is active when a coordinator for this definition is created.
Declaration
public string InitialValue { get; }
Property Value
| Type | Description |
|---|---|
| string |
Name
Gets the caller-defined identity of this set axis.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceCreate(string, string, params string[])
Creates a definition without requiring callers to repeat the initial value in the additional allowed values.
Declaration
public static ConfigurationSetDefinition Create(string name, string initialValue, params string[] additionalAllowedValues)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Caller-defined identity of the independent set axis. |
| string | initialValue | Value active when the coordinator is created; it is always included in the allowed values. |
| string[] | additionalAllowedValues | Additional values that may become active. |
Returns
| Type | Description |
|---|---|
| ConfigurationSetDefinition | A validated configuration-set definition whose allowed values start with |
IsAllowed(string)
Returns whether the supplied value belongs to this set.
Declaration
public bool IsAllowed(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value |
Returns
| Type | Description |
|---|---|
| bool |