mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-04-19 21:19:41 +00:00
feat: add conditions
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
namespace _Project.Develop.Runtime.Utilities.Conditions
|
||||
{
|
||||
public class FuncCondition : ICondition
|
||||
{
|
||||
private Func<bool> _condition;
|
||||
|
||||
public FuncCondition(Func<bool> condition)
|
||||
{
|
||||
_condition = condition;
|
||||
}
|
||||
|
||||
public bool Evaluate() => _condition.Invoke();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user