Skip to content

Create ConditionStateTriggerBase<T> base type #24

Description

@robertos

Many of the existing triggers have quite some boilerplate code, and follow the same structure: they take a Value of some type T, and activate when some condition Predicate<T> is met.

We could make a base class that would greatly reduce the boilerplate that would only expose one public property Value and a protected method or property Condition (a Predicate<T>), and that would reduce keep the trigger implementations limited to the "meaty part". Of course this base class could be inherited by 3rd parties who would like to create their own triggers based on simple conditions.

In the current library, the triggers that would benefit from this base trigger would be:

  • CompareStateTrigger
  • EqualsStateTrigger
  • IsFalseStateTrigger
  • NotEqualStateTrigger
  • IsNullOrEmptyStateTrigger (WIP)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions