mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
18 lines
509 B
C#
18 lines
509 B
C#
using System.Linq;
|
|
using Artemis.Models.Interfaces;
|
|
using Artemis.Profiles.Layers.Interfaces;
|
|
using Artemis.Profiles.Layers.Models;
|
|
|
|
namespace Artemis.Profiles.Layers.Conditions
|
|
{
|
|
public class DataModelCondition : ILayerCondition
|
|
{
|
|
public bool ConditionsMet(LayerModel layer, IDataModel dataModel)
|
|
{
|
|
lock (layer.Properties.Conditions)
|
|
{
|
|
return layer.Properties.Conditions.All(cm => cm.ConditionMet(dataModel));
|
|
}
|
|
}
|
|
}
|
|
} |