Class ConfigurationChange
Defines the changes of a configuration.
Namespace: Unity.Industrial.Forma.Core.Configuring
Syntax
[MovedFrom(true, "UnityEngine.Industrial.Configuring.Core", "Unity.Industrial.Configurator", null)]
public class ConfigurationChange
Constructors
ConfigurationChange(Configuration, IEnumerable<Feature>, IEnumerable<Feature>)
Creates a new configuration change that is applied to the configuration.
Declaration
public ConfigurationChange(Configuration configuration, IEnumerable<Feature> selectedFeatures, IEnumerable<Feature> deselectedFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| Configuration | configuration | The configuration. |
| IEnumerable<Feature> | selectedFeatures | The selected features. |
| IEnumerable<Feature> | deselectedFeatures | The deselected features. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Configuration must not be null |
ConfigurationChange(Configuration, ReadOnlyCollection<Feature>, ReadOnlyCollection<Feature>)
Creates a new configuration change that is applied to the configuration.
Declaration
[Obsolete("Please use ConfigurationChange(Configuration configuration, IEnumerable<Feature> selectedFeatures, IEnumerable<Feature> deselectedFeatures) instead")]
public ConfigurationChange(Configuration configuration, ReadOnlyCollection<Feature> selectedFeatures, ReadOnlyCollection<Feature> deselectedFeatures)
Parameters
| Type | Name | Description |
|---|---|---|
| Configuration | configuration | The configuration. |
| ReadOnlyCollection<Feature> | selectedFeatures | The selected features. |
| ReadOnlyCollection<Feature> | deselectedFeatures | The deselected features. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Configuration must not be null |
Properties
configuration
Configuration to which this change is tied to.
Declaration
public Configuration configuration { get; }
Property Value
| Type | Description |
|---|---|
| Configuration | The configuration. |
deselectedFeatures
List of features that are deselected (may be
null).
Declaration
public ReadOnlyCollection<Feature> deselectedFeatures { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<Feature> | The deselected features. |
isStale
If
true, the configuration change cannot be applied anymore
as the referenced configuration has changed since the creation of this
change.
Declaration
public bool isStale { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
selectedFeatures
List of features that are selected (may be
null).
Declaration
public ReadOnlyCollection<Feature> selectedFeatures { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<Feature> | The selected features. |
Methods
Apply()
Applies the change to the configuration.
Declaration
public void Apply()
Remarks
Throws an InvalidOperationException if the change is stale, i.e., the referenced configuration has been changed. Check isStale to see if it is stale.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The configuration change is stale and cannot be applied |