Table of Contents

Class LayerAdapter

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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

ReadOnlyCollection<IAdaptionHint>

Layer

Gets the layer this adapter can adapt

public Layer Layer { get; }

Property Value

Layer

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 IAdaptionHint

The 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

List<IAdaptionHint>

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 IAdaptionHint

The 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

EventHandler<LayerAdapterHintEventArgs>

AdapterHintRemoved

Occurs whenever an adapter hint is removed from the adapter.

public event EventHandler<LayerAdapterHintEventArgs>? AdapterHintRemoved

Event Type

EventHandler<LayerAdapterHintEventArgs>