mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Rendering - Moved bitmap management logic & prevent access violations
This commit is contained in:
1 parent
1a7a7e0582
commit
456af693b0
11 files changed
+310
-322
No files matched your search
@@ -94,19 +94,14 @@ namespace Artemis.Core
|
||||
|
||||
private bool EvaluateWithOperator(IEnumerable<DataModelConditionPart> targets)
|
||||
{
|
||||
switch (BooleanOperator)
|
||||
return BooleanOperator switch
|
||||
{
|
||||
case BooleanOperator.And:
|
||||
return targets.All(c => c.Evaluate());
|
||||
case BooleanOperator.Or:
|
||||
return targets.Any(c => c.Evaluate());
|
||||
case BooleanOperator.AndNot:
|
||||
return targets.All(c => !c.Evaluate());
|
||||
case BooleanOperator.OrNot:
|
||||
return targets.Any(c => !c.Evaluate());
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
BooleanOperator.And => targets.All(c => c.Evaluate()),
|
||||
BooleanOperator.Or => targets.Any(c => c.Evaluate()),
|
||||
BooleanOperator.AndNot => targets.All(c => !c.Evaluate()),
|
||||
BooleanOperator.OrNot => targets.Any(c => !c.Evaluate()),
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
}
|
||||
|
||||
#region IDisposable
|
||||
|
||||
Reference in new issue
Block a user