Skip to content

CanFire does not support triggers with parameters #453

@lloydjatkinson

Description

@lloydjatkinson

Currently CanFire has these two overloads:

        public bool CanFire(TTrigger trigger, out ICollection<string> unmetGuards);
        public bool CanFire(TTrigger trigger);

However it does not support triggers with parameters, is there a technical limitation for this? Is there any possibility of adding support for this? It seems strange that I can check if the trigger can be fired for "normal" triggers and get a list of unmet guards, but I can't for triggers with parameters.

As I have a few normal triggers and a few parameterised triggers, the best way I can see for how to achieve checking if it can fire now is to wrap a call to Fire with a try/catch. Not ideal if we can avoid exceptions fully if a new overload was added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions