private bool IsActive(ITransition iTransition) { bool?hideIfCriteriaDoNotFit = null; var targetState = iTransition.TargetState as XPBaseObject; if (targetState != null) { hideIfCriteriaDoNotFit = targetState.GetMemberValue(HideIfCriteriaDoNotFit) as bool?; } if (hideIfCriteriaDoNotFit.HasValue && hideIfCriteriaDoNotFit.Value && View.CurrentObject != null) { var ruleSetValidationResult = _stateMachineLogic.ValidateTransition(iTransition.TargetState, View.CurrentObject); return(ruleSetValidationResult.State != ValidationState.Invalid); } return(true); }
RuleSetValidationResult RuleSetValidationResult(XpoTransition xpoTransition, StateMachineLogic stateMachineLogic) { return(stateMachineLogic.ValidateTransition(xpoTransition.TargetState, View.CurrentObject)); }