I'm new to using Stateless and trying to make sure I understand the purpose of a guard clause. I'm able to create a state machine, but I want to essentially put a check on entering the state where the age > 12 && parent permission exists. Am I understanding Guard clause correctly, and if so, how would I implement such a clause?
var stateMachine = new StateMachine<State, Trigger>(State.EnrollmentCompleted);
stateMachine.Configure(State.EnrollmentCompleted)
.Permit(Trigger.EnrollmentCompleted,ValidatingEnrollment, ***Guardclause to check if user age > 12 and Parentpermission=true***);
return stateMachine;