Class Pack
A pack contains other features that are activated when the pack is activated.
Inherited Members
Namespace: Unity.Industrial.Forma.Core.Variants
Syntax
public sealed class Pack : Feature
Properties
features
List of features in this pack (read-only).
Declaration
public ReadOnlyCollection<Feature> features { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<Feature> | The features. |
variantTable
Variant table containing this Pack.
Declaration
public VariantTable variantTable { get; }
Property Value
Type | Description |
---|---|
VariantTable | The variant table. |
Methods
AddFeature(Feature)
Adds a feature to the pack (which must not already exist in the pack).
Declaration
public void AddFeature(Feature feature)
Parameters
Type | Name | Description |
---|---|---|
Feature | feature | The feature. |
Remarks
If the added feature is a pack, it is only checked if it is not this pack. No checks for longer cycles are done.
CheckForCycle()
Checks for a cycle in which the pack may be part.
Declaration
public IEnumerable<Pack> CheckForCycle()
Returns
Type | Description |
---|---|
IEnumerable<Pack> | Returns if the pack is not part of a cycle,
or the list of features that cause the cycle.
|
Remarks
The methods carries out a depth-first search from this pack and returns any cycle that is finds on the way. This pack may be part of this cycle or not.
RemoveFeature(Feature)
Removes a feature from the pack.
Declaration
public void RemoveFeature(Feature feature)
Parameters
Type | Name | Description |
---|---|---|
Feature | feature | The feature. |
Remarks
The feature must not be null and must be part of the pack;
otherwise a
Events
packChanged
Occurs when [pack changed].
Declaration
public event PackChangedHandler packChanged
Event Type
Type | Description |
---|---|
PackChangedHandler |