Class LayerAdapter
Represents an adapter that adapts a layer to a certain set of devices using IAdaptionHints
public class LayerAdapter : IStorageModel
- Inheritance
-
LayerAdapter
- Implements
Properties
AdaptionHints
Gets or sets a list containing the adaption hints used by this adapter
public ReadOnlyCollection<IAdaptionHint> AdaptionHints { get; set; }
Property Value
Layer
Gets the layer this adapter can adapt
public Layer Layer { get; }
Property Value
Methods
Adapt(List<ArtemisDevice>)
Modifies the layer, adapting it to the provided devices
public void Adapt(List<ArtemisDevice> devices)
Parameters
devices
List<ArtemisDevice>The devices to adapt the layer to
Add(IAdaptionHint)
Adds an adaption hint to the adapter.
public void Add(IAdaptionHint adaptionHint)
Parameters
adaptionHint
IAdaptionHintThe adaption hint to add.
Clear()
Removes all adaption hints from the adapter.
public void Clear()
DetermineHints(IEnumerable<ArtemisDevice>)
Automatically determine hints for this layer
public List<IAdaptionHint> DetermineHints(IEnumerable<ArtemisDevice> devices)
Parameters
devices
IEnumerable<ArtemisDevice>
Returns
Load()
Loads the model from its associated entity
public void Load()
Remove(IAdaptionHint)
Removes the first occurrence of a specific adaption hint from the adapter.
public void Remove(IAdaptionHint adaptionHint)
Parameters
adaptionHint
IAdaptionHintThe adaption hint to remove.
Save()
Saves the model to its associated entity
public void Save()
Events
AdapterHintAdded
Occurs whenever a new adapter hint is added to the adapter.
public event EventHandler<LayerAdapterHintEventArgs>? AdapterHintAdded
Event Type
AdapterHintRemoved
Occurs whenever an adapter hint is removed from the adapter.
public event EventHandler<LayerAdapterHintEventArgs>? AdapterHintRemoved